You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ho...@apache.org on 2018/03/29 18:28:48 UTC

[incubator-openwhisk-wskdeploy] branch master updated: Set the default tag to latest

This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 0094245  Set the default tag to latest
0094245 is described below

commit 0094245638f94acee4d0da18816dceec755e9457
Author: Viola Gao <ga...@126.com>
AuthorDate: Thu Mar 29 13:20:38 2018 -0400

    Set the default tag to latest
---
 .travis.yml | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 2060fa7..dc3d16a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,16 +50,7 @@ script:
 - "./tools/travis/script.sh"
 after_success:
 - DEPLOY_BUILD_READY=true
-# This tag is automatically generated for the latest merged commit in master branch.
-- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_OS_NAME" == "linux" ] ; then
-    git config --global user.email "builds@travis-ci.com";
-    git config --global user.name "Travis CI";
-    export GIT_TAG="latest";
-    git tag -d $GIT_TAG;
-    git push -q https://$API_KEY@github.com/apache/incubator-openwhisk-wskdeploy :refs/tags/$GIT_TAG;
-    GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag $GIT_TAG -a -m "Generated tag from Travis CI build $TRAVIS_BUILD_NUMBER";
-    git push -f -q https://$API_KEY@github.com/apache/incubator-openwhisk-wskdeploy $GIT_TAG;
-  fi
+
 after_script:
 - make clean
 before_deploy:
@@ -69,6 +60,17 @@ before_deploy:
 - ./gradlew --console=plain releaseBinaries
 - export RELEASE_PKG_FILE="$(cd "$TRAVIS_BUILD_DIR/release" && ls ${zip_file_name}-*.tgz ${zip_file_name}-*.zip)"
 - echo "Deploying $RELEASE_PKG_FILE to GitHub releases."
+- export GIT_TAG="latest"
+- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_OS_NAME" == "linux" ] ; then
+      git config --global user.email "builds@travis-ci.com";
+      git config --global user.name "Travis CI";
+      git tag -d $GIT_TAG;
+      git push -q https://$API_KEY@github.com/apache/incubator-openwhisk-wskdeploy :refs/tags/$GIT_TAG;
+      GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag $GIT_TAG -a -m "Generated tag from Travis CI build $TRAVIS_BUILD_NUMBER";
+  fi
+- if [ ! -z "$TRAVIS_TAG" ] ; then
+      export GIT_TAG=$TRAVIS_TAG;
+  fi
 
 deploy:
 - provider: releases
@@ -81,8 +83,7 @@ deploy:
   overwrite: true
   skip_cleanup: true
   target_commitish: $TRAVIS_COMMIT
-  tag_name: $TRAVIS_TAG
-  name: $TRAVIS_TAG
+  tag_name: $GIT_TAG
   on:
     repo: apache/incubator-openwhisk-wskdeploy
     condition: "$DEPLOY_BUILD_READY = true"

-- 
To stop receiving notification emails like this one, please contact
houshengbo@apache.org.