Fix release branch with auto-cut PR
@@ -57,6 +57,11 @@ done
RELEASE_ID=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/aws/amazon-vpc-cni-k8s/releases | \
jq --arg VERSION "$VERSION" '.[] | select(.tag_name==$VERSION) | .id')
+
+RELEASE_BRANCH=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
+ https://api.github.com/repos/aws/amazon-vpc-cni-k8s/releases | \
+ jq -r --arg VERSION "$VERSION" '.[] | select(.tag_name==$VERSION) | .target_commitish')
+
ASSET_IDS_UPLOADED=()
trap 'handle_errors_and_cleanup $?' EXIT
@@ -209,7 +214,6 @@ rm -rf "${SYNC_DIR}"
mkdir -p "${SYNC_DIR}"
cd "${SYNC_DIR}"
gh repo clone aws/amazon-vpc-cni-k8s
-RELEASE_BRANCH=$(git branch -a --contains $VERSION | grep "upstream" | cut -d '/' -f3)
echo "Release branch $RELEASE_BRANCH"
CONFIG_DIR=amazon-vpc-cni-k8s/config/master
cd $CONFIG_DIR
