Skip to content

Commit

Permalink
meta: fix release script for major beta versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Jul 6, 2022
1 parent 73388f0 commit becf4d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion private/release/choose-semverness.js
Expand Up @@ -104,7 +104,7 @@ export default async function pickSemverness (
{ title: 'Minor', value: 'minor' },
{ title: 'Major', value: 'major' },
],
initial: 0,
initial: 4,
})

if (!response.value) {
Expand Down
6 changes: 4 additions & 2 deletions private/release/commit-and-open-pr.js
@@ -1,7 +1,7 @@
import { spawnSync } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import prompts from 'prompts'
import { REPO_NAME, REPO_OWNER } from './config.js'
import { REPO_NAME, REPO_OWNER, TARGET_BRANCH } from './config.js'

function runProcessOrThrow (...args) {
const cp = spawnSync(...args)
Expand Down Expand Up @@ -81,6 +81,7 @@ export default async function commit (spawnOptions, STABLE_HEAD, ...files) {
}
}

const mergeSha = getContentFromProcessSync('git', ['rev-parse', 'HEAD'], spawnOptions)
runProcessOrThrow('git', ['cherry-pick', releaseSha], spawnOptions)
const sha = getContentFromProcessSync('git', ['rev-parse', 'HEAD'], spawnOptions)

Expand All @@ -91,6 +92,7 @@ export default async function commit (spawnOptions, STABLE_HEAD, ...files) {
console.log(`Please run \`git push ${remote} ${sha}:refs/heads/release-beta\`.`)
console.log(`An automation will kick off and open a release candidate PR
on the GitHub repository. Do not merge it manually! Review the PR (you may need to close and
re-open so the CI and test will run on it). If everything looks good, approve the PR —
re-open so the CI and test will run on it). If everything looks good, run
\`git push ${mergeSha}:refs/heads/${TARGET_BRANCH}\`, and approve the PR —
this will publish updated packages to npm, then the PR will be merged.`)
}

0 comments on commit becf4d6

Please sign in to comment.