Skip to content

Commit

Permalink
Merge pull request #2 from psu-libraries/appVersion
Browse files Browse the repository at this point in the history
adds appVersion to equal circle tag if it exists
  • Loading branch information
AndrewGearhart authored Jan 13, 2021
2 parents ec04976 + 233dc09 commit f51d26f
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 f51d26f

Please sign in to comment.