Skip to content

Commit 2d43f40

Browse files
authored
[AWS] Switch from using hub CLI to gh for forwarder release (#969)
1 parent 70c799c commit 2d43f40

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

aws/logs_monitoring/release.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ if ! command -v yq >/dev/null 2>&1; then
8585
log_error "yq not found, please install it following instructions here https://github.com/mikefarah/yq#install"
8686
fi
8787

88-
if ! command -v hub >/dev/null 2>&1; then
89-
log_error "hub not found, please install it following instructions here https://github.com/github/hub#installation"
88+
if ! command -v gh >/dev/null 2>&1; then
89+
log_error "gh not found, please install it following instructions here https://github.com/cli/cli?tab=readme-ov-file#installation"
9090
fi
9191

9292
# Read the desired version
@@ -226,8 +226,11 @@ prod_release() {
226226

227227
git add "settings.py" "template.yaml"
228228
git commit --signoff --message "ci(release): Update version from ${CURRENT_VERSION} to ${FORWARDER_VERSION}"
229+
git push origin "${BRANCH_NAME}"
229230

230-
hub pull-request --push --browse --message "Update version from ${CURRENT_VERSION} to ${FORWARDER_VERSION}"
231+
gh pr create --base master --head "${BRANCH_NAME}" \
232+
--title "Update version from ${CURRENT_VERSION} to ${FORWARDER_VERSION}" \
233+
--body "This PR updates the AWS Forwarder version to ${FORWARDER_VERSION} and the layer version to ${LAYER_VERSION}."
231234

232235
if ! user_confirm "Review and merge the pull-request before continuing. Continue"; then
233236
log_error "Aborting... To restart, run the script with PROD_GITHUB_RESTART=true env variable."
@@ -257,7 +260,11 @@ prod_asset_push() {
257260

258261
# Create a GitHub release
259262
log_info "Releasing aws-dd-forwarder-${FORWARDER_VERSION}, targetting commit ${GIT_COMMIT}, to GitHub..."
260-
hub release create -a "${BUNDLE_PATH}" -m "aws-dd-forwarder-${FORWARDER_VERSION}" -t "${GIT_COMMIT}" "aws-dd-forwarder-${FORWARDER_VERSION}"
263+
264+
gh release create "aws-dd-forwarder-${FORWARDER_VERSION}" "${BUNDLE_PATH}#aws-dd-forwarder-${FORWARDER_VERSION}" \
265+
--title "aws-dd-forwarder-${FORWARDER_VERSION}" \
266+
--target "${GIT_COMMIT}" \
267+
--draft
261268

262269
# Set vars for use in the installation test
263270
TEMPLATE_URL="https://${BUCKET}.s3.amazonaws.com/aws/forwarder/latest.yaml"

0 commit comments

Comments
 (0)