Skip to content

Commit

Permalink
Fix TAG_NAME interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Nov 26, 2019
1 parent bec5d9c commit 95c0708
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ steps:
args:
- -c
- |
REF="${TAG_NAME//v}"
TAG="${TAG_NAME}"
REF="${TAG//v}"
[[ -z "$${REF}" && "${BRANCH_NAME}" == "master" ]] && REF="latest"
[[ -z "$${REF}" ]] && echo "not a tag or master branch" && exit 0
gsutil cp build/*.tgz gs://oauth2l/$${REF}/
Expand All @@ -48,7 +49,8 @@ steps:
args:
- -c
- |
REF="${TAG_NAME//v}"
TAG="${TAG_NAME}"
REF="${TAG//v}"
[[ -z "$${REF}" && "${BRANCH_NAME}" == "master" ]] && REF="latest"
[[ -z "$${REF}" ]] && echo "not a tag or master branch" && exit 0
docker build -t gcr.io/${PROJECT_ID}/oauth2l:$${REF} . && \
Expand Down

0 comments on commit 95c0708

Please sign in to comment.