Skip to content

Commit

Permalink
adds appVersion to equal circle tag if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Dann Bohn committed Jan 13, 2021
1 parent ec04976 commit 233dc09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/pr-release
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ git remote set-url origin "http://${GITHUB_USER}:${GITHUB_TOKEN}@$project"
git config --global user.email "${GITHUB_USER}@psu.edu"
git config --global user.name "${GITHUB_USER}"


filename=$1
git checkout -b $CIRCLE_PROJECT_REPONAME-$CIRCLE_TAG
sed -i -e 's/^\([[:space:]]*\)values: |/\1values:/g' $filename
yq w "$filename" spec.source.helm.values.image.tag $CIRCLE_TAG -i
sed -i -e 's/[[:space:]]values:/ values: |/g' "$filename"

if [[ ! $(yq read $filename metadata.annotations.appVersion) == "null" ]]; then
echo "adding appVersion"
yq w "$filename" metadata.annotations.appVersion $CIRCLE_TAG -i
fi

git add $filename
git commit -m "release $CIRCLE_TAG for $CIRCLE_PROJECT_REPONAME"
git push -u origin $CIRCLE_PROJECT_REPONAME-$CIRCLE_TAG
Expand Down

0 comments on commit 233dc09

Please sign in to comment.