Skip to content

Commit

Permalink
Update upload-resources-to-github.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthvn authored Mar 17, 2022
1 parent 2572cf9 commit 647abb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/upload-resources-to-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ done
RELEASE_ID=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/jayanthvn/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/jayanthvn/amazon-vpc-cni-k8s/releases | \
jq --arg VERSION "$VERSION" '.[] | select(.tag_name==$VERSION) | .target_commitish')

ASSET_IDS_UPLOADED=()

trap 'handle_errors_and_cleanup $?' EXIT
Expand Down Expand Up @@ -209,7 +214,6 @@ rm -rf "${SYNC_DIR}"
mkdir -p "${SYNC_DIR}"
cd "${SYNC_DIR}"
gh repo clone jayanthvn/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
Expand Down

0 comments on commit 647abb4

Please sign in to comment.