Unverified Commit 762bff65 authored by Joseph's avatar Joseph Committed by GitHub

fix: run lerna on a branch (#91092)

Trying to fix: `lerna ERR! ENOGIT Detached git HEAD, please checkout a
branch to choose versions.` on `set-preview-version.js`

[Slack
thread](https://vercel.slack.com/archives/C02CDC2ALJH/p1773051154649349)
parent 1ead596c
...@@ -31,6 +31,12 @@ async function main() { ...@@ -31,6 +31,12 @@ async function main() {
// 15.0.0 -> 15.0.0 // 15.0.0 -> 15.0.0
const [semverStableVersion] = lernaConfig.version.split('-') const [semverStableVersion] = lernaConfig.version.split('-')
const version = `${semverStableVersion}-preview-${shortSha}-${dateString}` const version = `${semverStableVersion}-preview-${shortSha}-${dateString}`
//
// Lerna version requires a non-detached HEAD
await execa('git', ['checkout', '-B', `preview/${shortSha}`, githubSha], {
cwd: repoRoot,
stdio: 'inherit',
})
await execa( await execa(
'pnpm', 'pnpm',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment