diff options
author | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2016-09-23 14:35:18 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-09-23 14:35:18 -0700 |
commit | 7c382524a959a2bc9b3d2fca44f6f0b41aba4e3c (patch) | |
tree | 23ae09f399ac9dbd5cfcbd342091d4ed699c6f66 /dev/create-release/release-tag.sh | |
parent | 90a30f46349182b6fc9d4123090c4712fdb425be (diff) | |
download | spark-7c382524a959a2bc9b3d2fca44f6f0b41aba4e3c.tar.gz spark-7c382524a959a2bc9b3d2fca44f6f0b41aba4e3c.tar.bz2 spark-7c382524a959a2bc9b3d2fca44f6f0b41aba4e3c.zip |
[SPARK-17651][SPARKR] Set R package version number along with mvn
## What changes were proposed in this pull request?
This PR sets the R package version while tagging releases. Note that since R doesn't accept `-SNAPSHOT` in version number field, we remove that while setting the next version
## How was this patch tested?
Tested manually by running locally
Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
Closes #15223 from shivaram/sparkr-version-change.
Diffstat (limited to 'dev/create-release/release-tag.sh')
-rwxr-xr-x | dev/create-release/release-tag.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dev/create-release/release-tag.sh b/dev/create-release/release-tag.sh index d404939d1c..b7e5100ca7 100755 --- a/dev/create-release/release-tag.sh +++ b/dev/create-release/release-tag.sh @@ -60,12 +60,27 @@ git config user.email $GIT_EMAIL # Create release version $MVN versions:set -DnewVersion=$RELEASE_VERSION | grep -v "no value" # silence logs +# Set the release version in R/pkg/DESCRIPTION +sed -i".tmp1" 's/Version.*$/Version: '"$RELEASE_VERSION"'/g' R/pkg/DESCRIPTION +# Set the release version in docs +sed -i".tmp1" 's/SPARK_VERSION:.*$/SPARK_VERSION: '"$RELEASE_VERSION"'/g' docs/_config.yml +sed -i".tmp2" 's/SPARK_VERSION_SHORT:.*$/SPARK_VERSION_SHORT: '"$RELEASE_VERSION"'/g' docs/_config.yml + git commit -a -m "Preparing Spark release $RELEASE_TAG" echo "Creating tag $RELEASE_TAG at the head of $GIT_BRANCH" git tag $RELEASE_TAG # Create next version $MVN versions:set -DnewVersion=$NEXT_VERSION | grep -v "no value" # silence logs +# Remove -SNAPSHOT before setting the R version as R expects version strings to only have numbers +R_NEXT_VERSION=`echo $NEXT_VERSION | sed 's/-SNAPSHOT//g'` +sed -i".tmp2" 's/Version.*$/Version: '"$R_NEXT_VERSION"'/g' R/pkg/DESCRIPTION + +# Update docs with next version +sed -i".tmp3" 's/SPARK_VERSION:.*$/SPARK_VERSION: '"$NEXT_VERSION"'/g' docs/_config.yml +# Use R version for short version +sed -i".tmp4" 's/SPARK_VERSION_SHORT:.*$/SPARK_VERSION_SHORT: '"$R_NEXT_VERSION"'/g' docs/_config.yml + git commit -a -m "Preparing development version $NEXT_VERSION" # Push changes |