File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,12 +71,25 @@ script:
7171
7272after_success :
7373 - export DEPLOY_BUILD_READY=true
74+ - if [ "$TRAVIS_EVENT_TYPE" == "cron" ] ; then
75+ export DEPLOY_BUILD_READY=false;
76+ fi
7477
7578before_deploy :
7679 - export RELEASE_PKG_FILE="$(cd "$TRAVIS_BUILD_DIR/release" && ls ${zip_file_name}-*.tgz ${zip_file_name}-*.zip)"
7780 - echo "Deploying $RELEASE_PKG_FILE to GitHub releases."
7881 - export GIT_TAG="latest"
7982 - export TAG=false;
83+ # This tag is automatically generated for the latest merged commit in master branch.
84+ - if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_OS_NAME" == "linux" ] ; then
85+ git config --global user.email "builds@travis-ci.com";
86+ git config --global user.name "Travis CI";
87+ export GIT_TAG="latest";
88+ git tag -d $GIT_TAG;
89+ git push -q https://$API_KEY@github.com/apache/incubator-openwhisk-cli :refs/tags/$GIT_TAG;
90+ GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag $GIT_TAG -a -m "Generated tag from Travis CI build $TRAVIS_BUILD_NUMBER";
91+ git push -f -q https://$API_KEY@github.com/apache/incubator-openwhisk-cli $GIT_TAG;
92+ fi
8093 - if [ ! -z "$TRAVIS_TAG" ] ; then
8194 export GIT_TAG=$TRAVIS_TAG;
8295 export TAG=true;
You can’t perform that action at this time.
0 commit comments