From ca831170f405b0779f5ea3f6852a7eef8997dd68 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Mon, 26 Mar 2018 15:07:24 -0500 Subject: [PATCH] Add different version files based on branch/tag --- .travis/deploy_script.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh index f6f1fe80..3d32cdb5 100755 --- a/.travis/deploy_script.sh +++ b/.travis/deploy_script.sh @@ -67,5 +67,15 @@ if [ "$TRAVIS" = "true" ]; then mv "/tmp/$TAR_NAME" "/tmp/$TAR_NAME.sha256" . artifacts upload --target-paths "/" $TAR_NAME $TRAVIS_BUILD_DIR/VERSION $TAR_NAME.sha256 + # Upload the version for a tagged release. Move to a version file in different + # tags. Within phpVMS, we have an option of which version to track in the admin + if test "$TRAVIS_TAG"; then + cp $TRAVIS_BUILD_DIR/VERSION $TRAVIS_BUILD_DIR/release_version + artifacts upload --target-paths "/" $TRAVIS_BUILD_DIR/release_version + else + cp $TRAVIS_BUILD_DIR/VERSION $TRAVIS_BUILD_DIR/$TRAVIS_BRANCH_version + artifacts upload --target-paths "/" $TRAVIS_BUILD_DIR/$TRAVIS_BRANCH_version + fi + curl -X POST --data "{\"content\": \"A new build is available at http://downloads.phpvms.net/$TAR_NAME ($VERSION)\"}" -H "Content-Type: application/json" $DISCORD_WEBHOOK_URL fi