diff options
author | Edward Hervey <bilboed@bilboed.com> | 2015-10-12 15:45:57 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2015-10-12 15:45:57 +0200 |
commit | b122a11e3344de33a59400942ae3e3ffa112ac6d (patch) | |
tree | 98be32c21c804e0d4b9ed27c171a5000817e6ce6 | |
parent | 14a417c51f8c1f648f762d6cced13eafc623ed41 (diff) |
commit-repo: Add BUILD_PREFIX support
Allows us to make a difference between builds
-rwxr-xr-x | commit-repo-tag.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/commit-repo-tag.sh b/commit-repo-tag.sh index a9689de..8499852 100755 --- a/commit-repo-tag.sh +++ b/commit-repo-tag.sh @@ -20,6 +20,13 @@ then BUILD_BRANCH=jenkins-build-branch fi +if [ -z $BUILD_PREFIX ]; +then + BUILD_PREFIX= +else + BUILD_PREFIX+="_" +fi + # The default manifest file name MANIFEST_FILENAME=default.xml @@ -50,7 +57,7 @@ echo # Gets the current repo root dir ROOT_DIR=`pwd` -echo "Generating new manifest file for BUILD_ID $BUILD_ID" +echo "Generating new manifest file for BUILD_ID $BUILD_ID [$BUILD_PREFIX]" # Create new manifest with all revisions repo manifest -r -o $TMP_M_FILENAME @@ -79,7 +86,7 @@ then # Tag the new manifest version CUR_DATE=`date +%Y%m%d` - git tag -a "build_$BUILD_ID" \ + git tag -a "build_${BUILD_PREFIX}$BUILD_ID" \ -m "Tagging manifest build $BUILD_ID" echo "Pushing new manifest to the branch $BUILD_BRANCH" |