diff --git a/.travis.yml b/.travis.yml index ea9ae548c0..541fa2a939 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,8 @@ stages: if: type = pull_request - name: Update Children Projects if: branch = master AND type = push OR (tag =~ .*beta.*) + - name: Release beta tag + if: type = cron addons: chrome: stable @@ -75,6 +77,9 @@ jobs: - stage: Update Children Projects script: ./scripts/travis/update/update-children.sh + - stage: Release beta tag + script: ./scripts/travis/release/git-tag-beta.sh + - stage: e2e Test name: core diff --git a/scripts/travis/build/build.sh b/scripts/travis/build/build.sh index 31aba581c1..56e7a340a3 100755 --- a/scripts/travis/build/build.sh +++ b/scripts/travis/build/build.sh @@ -14,7 +14,12 @@ then if [[ $TRAVIS_BRANCH == "development" ]]; then - ./scripts/update-version.sh -gnu -nextalpha || exit 1; + NEXT_VERSION=-nextalpha + if [[ $TRAVIS_EVENT_TYPE == "cron" ]]; + then + NEXT_VERSION=-nextbeta + fi + ./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1; fi node ./scripts/pre-publish.js diff --git a/scripts/travis/release/git-tag-beta.sh b/scripts/travis/release/git-tag-beta.sh new file mode 100755 index 0000000000..cc05f59959 --- /dev/null +++ b/scripts/travis/release/git-tag-beta.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +VERSION=$(npm view @alfresco/adf-core@beta version) + +echo "git tag -a ${VERSION} -m ${VERSION}" +git tag -a ${VERSION} -m "${VERSION} [ci skip] " +git remote rm origin +git remote add origin 'git@github.com:Alfresco/alfresco-ng2-components.git' +git push origin --tags