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