Skip to content

Commit

Permalink
fix: release bugs due to external changes (#2539)
Browse files Browse the repository at this point in the history
* fix: accomadate TPS/changement API change

* fix: account for homebrew-brew repo branch change
  • Loading branch information
ryandagg committed Nov 6, 2023
1 parent 67543ab commit cf78e2e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/promote-release.yml
Expand Up @@ -78,6 +78,5 @@ jobs:
TPS_API_URL_PARAM: ${{ secrets.TPS_API_URL_PARAM }}
steps:
- uses: actions/checkout@v3
- run: |
yarn --immutable --network-timeout 1000000
./scripts/postrelease/change_management
- run: yarn --immutable --network-timeout 1000000
- run: ./scripts/postrelease/change_management
6 changes: 3 additions & 3 deletions .github/workflows/rollback.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
else
echo "isStableRelease=false" >> $GITHUB_OUTPUT
fi
promote-previous-tag:
needs: determine-target-tag
name: Promote ${{ needs.determine-target-tag.outputs.targetTag }} to ${{ needs.determine-target-tag.outputs.isStableRelease && 'stable' || 'beta' }}
Expand Down Expand Up @@ -86,6 +86,6 @@ jobs:
- name: yarn install
run: yarn --immutable --network-timeout 1000000
- name: rollback homebrew
run: ./scripts/rollback/homebrew.js
run: node ./scripts/rollback/homebrew.js
env:
ROLLBACK_VERSION: ${{ inputs.version-to-roll-back }}
ROLLBACK_VERSION: ${{ inputs.version-to-roll-back }}
1 change: 1 addition & 0 deletions scripts/postrelease/change_management
Expand Up @@ -46,6 +46,7 @@ async function sendDeployNotification () {
release: {
actor_email: actorEmail,
app_id: appId,
component_name: 'cli',
description: `Deploy ${sha} of heroku/cli in ${stage}`,
sha,
stage
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/homebrew.js
Expand Up @@ -121,7 +121,7 @@ async function updateHomebrew() {
await git(['diff', '--cached'], {stdio: 'inherit'})
await git(['commit', '-m', `heroku v${VERSION}`])
if (process.env.SKIP_GIT_PUSH === undefined) {
await git(['push', 'origin', 'master'])
await git(['push', 'origin', 'main'])
}
}

Expand Down
6 changes: 2 additions & 4 deletions scripts/rollback/homebrew.js
@@ -1,5 +1,3 @@
#!/usr/bin/env node

const execa = require('execa')
const mkdirp = require('mkdirp')
const path = require('path')
Expand Down Expand Up @@ -40,15 +38,15 @@ async function rollbackHomebrew() {
// get commit to revert
const commitToRevert = await git(['log', `--grep=v${ROLLBACK_VERSION}`])

if(commitToRevert.contains('revert')) {
if (commitToRevert.contains('revert')) {
console.log(`${ROLLBACK_VERSION} has already been reverted`)
process.exit(1)
}

// revert commit
await git(['revert', commitToRevert])
if (SKIP_GIT_PUSH === undefined) {
await git(['push', 'origin', 'master'])
await git(['push', 'origin', 'main'])
}
}

Expand Down

0 comments on commit cf78e2e

Please sign in to comment.