fetch main during patch publish

pull/3203/head
David Sheldrick 2024-03-11 09:26:12 +00:00
rodzic 9d5b9b6630
commit 72a0c7f0b9
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -28,8 +28,9 @@ async function main() {
}
// we could probably do this a lot earlier in the yml file but 🤷‍♂️
await exec('git', ['fetch', 'origin', 'main'])
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) {