From 6ed5cb66e581db0d825ce11d4252ab0288efb776 Mon Sep 17 00:00:00 2001 From: My Ho Date: Wed, 19 Jun 2019 15:34:40 -0700 Subject: [PATCH] [CI/CD] clean up travis so it doesn't run tests again on release --- .travis.yml | 3 ++- scripts/tagBranchForRelease.sh | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d82365c..536eeeb5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,8 @@ branches: - /^v.*$/ # Ensure to build release tags of format v1.0.0-1 stages: - - test + - name: test + if: tag IS NOT present - name: publish if: tag IS present # https://docs.travis-ci.com/user/conditions-v1 diff --git a/scripts/tagBranchForRelease.sh b/scripts/tagBranchForRelease.sh index 6afa93e8..84ae7606 100755 --- a/scripts/tagBranchForRelease.sh +++ b/scripts/tagBranchForRelease.sh @@ -12,5 +12,6 @@ fi echo "getting latest" git pull PACKAGE_VERSION=$(node -p -e "require('./package.json').version") -git tag $PACKAGE_VERSION -git push origin $PACKAGE_VERSION +TAG="v${PACKAGE_VERSION}" +git tag $TAG +git push origin $TAG