File tree Expand file tree Collapse file tree 3 files changed +62
-1
lines changed
Expand file tree Collapse file tree 3 files changed +62
-1
lines changed Original file line number Diff line number Diff line change 1+ name = R Language Mode
2+ authorList = [Processing.R Authors](https://github.com/gaocegege/Processing.R/blob/master/AUTHORS.md)
3+ url = https://github.com/gaocegege/Processing.R
4+ sentence = Processing in R Language
5+ paragraph =
6+ version = @@mode-version@@
7+ prettyVersion = @@pretty-version@@
8+ maxVersion = 0
9+ minVersion = 260
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name = R Language Mode
22authors = [Processing.R Authors](https://github.com/gaocegege/Processing.R/blob/master/AUTHORS.md)
33url = https://github.com/gaocegege/Processing.R
44sentence = Processing in R Language
5- paragraph = Nil
5+ paragraph =
66version = @@mode-version@@
77prettyVersion = @@pretty-version@@
88maxVersion = 0
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Usage: deploy.sh <version>
4+
5+ ROOT=$( dirname " ${BASH_SOURCE} " ) /..
6+ numberOfParams=1
7+
8+ # Timestamped log, e.g. log "started to build the binary".
9+ #
10+ # Input:
11+ # $1 Log string.
12+ function log {
13+ echo -e " [` TZ=Asia/Shanghai date` ] ${1} "
14+ }
15+
16+ function help {
17+ log " Usage: deploy.sh <version>"
18+ }
19+
20+ function deploy {
21+ if [[ $# -ne ${numberOfParams} ]]; then
22+ log " The number of parameters is $# , which does not match ${FUNCNAME} in ${BASH_SOURCE} ."
23+ help
24+ exit 1
25+ fi
26+
27+ cd ${ROOT}
28+
29+ mkdir -p docs
30+ cp resources/RLangMode.txt docs/RLangMode.txt
31+
32+ log " Injecting version into docs/RLangMode.txt"
33+ # Get commit ID.
34+ commitid=$( git log -n1 --format=" %h" )
35+ version=${1}
36+ date=` date " +%Y/%m/%d %R" `
37+ pretty_version=" Version ${version} , commit ${commitid} , built ${date} "
38+
39+ perl -i -pe " s|\@\@mode-version\@\@|${version} |g" docs/RLangMode.txt
40+ perl -i -pe " s|\@\@pretty-version\@\@|${pretty_version} |g" docs/RLangMode.txt
41+
42+ scripts/generate-ant-file.sh.backup
43+ ant package
44+ cd dist/
45+ zip -r RLangMode.zip RLangMode/
46+ cd - > /dev/null
47+ mv dist/RLangMode.zip docs/
48+
49+ cd - > /dev/null
50+ }
51+
52+ deploy $*
You can’t perform that action at this time.
0 commit comments