From d88e2ecd46aeb55d98d94ec2ba38fc8dcae3c296 Mon Sep 17 00:00:00 2001 From: psu-stewardship-bot Date: Wed, 23 Aug 2023 14:20:19 -0400 Subject: [PATCH] yq4 syntax for pr release script --- bin/pr-release | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bin/pr-release b/bin/pr-release index bcc2444..bfe5ebc 100755 --- a/bin/pr-release +++ b/bin/pr-release @@ -10,14 +10,8 @@ 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 + +yq -i ".spec.source.helm.valuesObject.image.tag=\"$CIRCLE_TAG\"" "$filename" git add $filename git commit -m "release $CIRCLE_TAG for $CIRCLE_PROJECT_REPONAME"