From 46e53105c21be9a3c8d8a2e860f1b41d1e686700 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Mon, 25 Nov 2019 11:44:33 +0000 Subject: [PATCH] improve travis conf for avoid multiple tag --- .travis.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 470861899a..7e2b41b8d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ git: language: node_js dist: trusty -sudo: required node_js: # Use the explicit NodeJS LTS version 8.9.4 to avoid any automatic upgrade of the version. - '10.16.0' @@ -129,18 +128,18 @@ jobs: before_deploy: - # Set up git user name and tag this commit - - git config --local user.name "Alfresco" - - export TRAVIS_TAG=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]') - - echo "Create tag:" $TRAVIS_TAG - - git tag $TRAVIS_TAG + if ![[ $TRAVIS_TAG ]]; then + git config --local user.name "Alfresco" + export TRAVIS_TAG=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]') + echo "Create tag:" $TRAVIS_TAG + git tag $TRAVIS_TAG + fi deploy: provider: releases api_key: $GITHUB_TOKEN name: $TRAVIS_TAG body: "Add the release note" - skip_cleanup: true on: branch: master