Skip to content

Commit

Permalink
Add support for release candidate version tags
Browse files Browse the repository at this point in the history
Any release tag with a `rc` string in the the semver
will be ignored for the docs on the website and will _not_ update the
"latest" docker image tag, or "latest" downloads url.

Signed-off-by: Patrick East <[email protected]>
  • Loading branch information
patrick-east committed Mar 26, 2020
1 parent 1ebe25d commit 7002b6f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ deploy:
tags: false

# This deployment is mutually exclusive with the other deployments. This
# deployment builds and publishes the docker image whenver a new tag is
# deployment builds and publishes the docker image whenever a new tag is
# created on the master branch. The latest tag is updated to point to the
# image produced by this deployment. The edge tag is not updated.
- provider: script
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ push-image: docker-login image-quick push
deploy-travis: push-image tag-edge push-edge push-binary-edge

.PHONY: release-travis
# Don't tag and push "latest" image tags if the version is a release candidate
ifneq (,$(findstring rc,$(VERSION)))
release-travis: push-image
else
release-travis: push-image tag-latest push-latest
endif

.PHONY: release-bugfix-travis
release-bugfix-travis: deploy-travis
Expand Down
9 changes: 8 additions & 1 deletion docs/website/scripts/load-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ PREV_MAJOR_VER="-1"
PREV_MINOR_VER="-1"
for release in ${ALL_RELEASES}; do
CUR_SEM_VER=${release#"v"}

# ignore any release candidate versions, for now if they
# are the "latest" they'll be documented under "edge"
if [[ "${CUR_SEM_VER}" == *"rc"* ]]; then
continue
fi

SEMVER_REGEX='[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)'
CUR_MAJOR_VER=$(echo ${CUR_SEM_VER} | sed -e "s#${SEMVER_REGEX}#\1#")
CUR_MINOR_VER=$(echo ${CUR_SEM_VER} | sed -e "s#${SEMVER_REGEX}#\2#")
Expand Down Expand Up @@ -68,7 +75,7 @@ function restore_tree {
function cleanup {
EXIT_CODE=$?

if [[ "${EXIT_CODE}" != "0" ]]; then
if [[ "${EXIT_CODE}" != "0" ]]; then
# on errors attempt to restore the starting tree state
restore_tree

Expand Down

0 comments on commit 7002b6f

Please sign in to comment.