-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ce Gao <ce.gao@outlook.com>
- Loading branch information
Showing
3 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name = R Language Mode | ||
authorList = [Processing.R Authors](https://github.com/gaocegege/Processing.R/blob/master/AUTHORS.md) | ||
url = https://github.com/gaocegege/Processing.R | ||
sentence = Processing in R Language | ||
paragraph = | ||
version = @@mode-version@@ | ||
prettyVersion = @@pretty-version@@ | ||
maxVersion = 0 | ||
minVersion = 260 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Usage: deploy.sh <version> | ||
|
||
ROOT=$(dirname "${BASH_SOURCE}")/.. | ||
numberOfParams=1 | ||
|
||
# Timestamped log, e.g. log "started to build the binary". | ||
# | ||
# Input: | ||
# $1 Log string. | ||
function log { | ||
echo -e "[`TZ=Asia/Shanghai date`] ${1}" | ||
} | ||
|
||
function help { | ||
log "Usage: deploy.sh <version>" | ||
} | ||
|
||
function deploy { | ||
if [[ $# -ne ${numberOfParams} ]]; then | ||
log "The number of parameters is $#, which does not match ${FUNCNAME} in ${BASH_SOURCE}." | ||
help | ||
exit 1 | ||
fi | ||
|
||
cd ${ROOT} | ||
|
||
mkdir -p docs | ||
cp resources/RLangMode.txt docs/RLangMode.txt | ||
|
||
log "Injecting version into docs/RLangMode.txt" | ||
# Get commit ID. | ||
commitid=$(git log -n1 --format="%h") | ||
version=${1} | ||
date=`date "+%Y/%m/%d %R"` | ||
pretty_version="Version ${version}, commit ${commitid}, built ${date}" | ||
|
||
perl -i -pe "s|\@\@mode-version\@\@|${version}|g" docs/RLangMode.txt | ||
perl -i -pe "s|\@\@pretty-version\@\@|${pretty_version}|g" docs/RLangMode.txt | ||
|
||
scripts/generate-ant-file.sh.backup | ||
ant package | ||
cd dist/ | ||
zip -r RLangMode.zip RLangMode/ | ||
cd - > /dev/null | ||
mv dist/RLangMode.zip docs/ | ||
|
||
cd - > /dev/null | ||
} | ||
|
||
deploy $* |