Skip to content

Commit 5ec5c3c

Browse files
1gtmtamalsaha
andauthored
[cherry-pick] Update update-release-tracker.sh (#54)
/cherry-pick Signed-off-by: Tamal Saha <tamal@appscode.com> Co-authored-by: Tamal Saha <tamal@appscode.com>
1 parent 409301c commit 5ec5c3c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

hack/scripts/update-release-tracker.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,30 @@ parse_url() {
3333
export RELEASE_TRACKER_PR=${PARTS[4]}
3434
}
3535

36-
RELEASE_TRACKER=
36+
RELEASE_TRACKER=${RELEASE_TRACKER:-}
37+
GITHUB_BASE_REF=${GITHUB_BASE_REF:-}
3738

3839
while IFS=$': \r\t' read -r -u9 marker v; do
3940
case $marker in
4041
Release-tracker)
41-
export RELEASE_TRACKER=$v
42+
export RELEASE_TRACKER=$(echo $v | tr -d '\r\t')
4243
;;
4344
Release)
44-
export RELEASE=$v
45+
export RELEASE=$(echo $v | tr -d '\r\t')
4546
;;
4647
esac
4748
done 9< <(git show -s --format=%b)
4849

49-
[ ! -z $RELEASE_TRACKER ] || {
50+
[ ! -z "$RELEASE_TRACKER" ] || {
5051
echo "Release-tracker url not found."
5152
exit 0
5253
}
5354

55+
[ ! -z "$GITHUB_BASE_REF" ] || {
56+
echo "GitHub base ref not found."
57+
exit 0
58+
}
59+
5460
parse_url $RELEASE_TRACKER
5561
api_url="repos/${RELEASE_TRACKER_OWNER}/${RELEASE_TRACKER_REPO}/issues/${RELEASE_TRACKER_PR}/comments"
5662

0 commit comments

Comments
 (0)