Skip to content

Commit

Permalink
refactor(build): trim leading v from image tag
Browse files Browse the repository at this point in the history
Signed-off-by: mayank <[email protected]>
  • Loading branch information
mayank authored and kmova committed May 7, 2020
1 parent 8d07bff commit ed8355b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions push
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ then
# Push with different tags if tagged as a release
# When github is tagged with a release, then Travis will
# set the release tag in env TRAVIS_TAG
TagAndPushImage "${DIMAGE}" "${TRAVIS_TAG}"
# Trim the `v` from the TRAVIS_TAG if it exists
# Example: v1.10.0 maps to 1.10.0
# Example: 1.10.0 maps to 1.10.0
# Example: v1.10.0-custom maps to 1.10.0-custom
TagAndPushImage "${DIMAGE}" "${TRAVIS_TAG#v}"
TagAndPushImage "${DIMAGE}" "latest"
fi;
else
Expand All @@ -103,7 +107,8 @@ then
# Push with different tags if tagged as a release
# When github is tagged with a release, then Travis will
# set the release tag in env TRAVIS_TAG
TagAndPushImage "quay.io/${DIMAGE}" "${TRAVIS_TAG}"
# Trim the `v` from the TRAVIS_TAG if it exists
TagAndPushImage "quay.io/${DIMAGE}" "${TRAVIS_TAG#v}"
TagAndPushImage "quay.io/${DIMAGE}" "latest"
fi;
else
Expand Down

0 comments on commit ed8355b

Please sign in to comment.