[infra] Fix patch release script (#3095)
Need to make sure we have access to the `main` branch so we can calculate how many commits the branch has diverged by. ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2]
This commit is contained in:
parent
a8b7d4e2d0
commit
464b1e9cab
2 changed files with 4 additions and 3 deletions
|
@ -172,8 +172,8 @@ export async function publish(distTag?: string) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
delay: 3000,
|
delay: 4000,
|
||||||
numAttempts: 10,
|
numAttempts: 20,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,9 @@ async function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// we could probably do this a lot earlier in the yml file but 🤷♂️
|
// we could probably do this a lot earlier in the yml file but 🤷♂️
|
||||||
|
await exec('git', ['fetch', 'origin', 'main'])
|
||||||
const numberOfCommitsSinceBranch = Number(
|
const numberOfCommitsSinceBranch = Number(
|
||||||
(await exec('git', ['rev-list', '--count', `HEAD`, '^main'])).toString().trim()
|
(await exec('git', ['rev-list', '--count', `HEAD`, '^origin/main'])).toString().trim()
|
||||||
)
|
)
|
||||||
|
|
||||||
if (numberOfCommitsSinceBranch === 0) {
|
if (numberOfCommitsSinceBranch === 0) {
|
||||||
|
|
Loading…
Reference in a new issue