Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic version for dev releases #469

Merged
merged 1 commit into from Oct 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions .travis.yml
Expand Up @@ -11,7 +11,10 @@ env:
- BUILD_VERSION=$TRAVIS_TAG

before_install:
- if [ -z "${BUILD_VERSION/dev/}" ]; then export BUILD_VERSION="0-dev.$TRAVIS_BUILD_NUMBER"; fi
- if [ -z "$BUILD_VERSION" ]; then
export BUILD_VERSION=$(curl -s https://api.github.com/repos/${TRAVIS_REPO_SLUG}/releases |
jq -r '( first(.[] | select(.prerelease == true)) ) | .tag_name');
fi

cache:
directories:
Expand Down Expand Up @@ -94,9 +97,9 @@ jobs:
# Development bleeding-edge release (on master commits only)
- stage: release-dev
script:
- git tag -f dev
- git tag -f $BUILD_VERSION
- git remote add gh https://${TRAVIS_REPO_SLUG%/*}:${GIT_RELEASES_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
- git push -f gh dev
- git push -f gh $BUILD_VERSION

- script:
- bin/release_goreport
Expand All @@ -119,7 +122,7 @@ jobs:
- docker load -i build/docker/myst_alpine.tgz
- docker load -i build/docker/myst_ubuntu.tgz
- bin/release_docker $TRAVIS_TAG
- if [ "$TRAVIS_TAG" != "dev" ]; then bin/release_docker latest; fi
- if [[ $TRAVIS_TAG != *-rc ]]; then bin/release_docker latest; fi
name: "Pushing release to hub.docker.com"

notifications:
Expand Down