Fix release eliding (#3156)

Follow up to #3153, after testing some more I found some issues to fix.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [x] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [x] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
pull/3099/head^2
David Sheldrick 2024-03-14 15:41:55 +00:00 zatwierdzone przez GitHub
rodzic 44a3ea7363
commit 79d6058d3c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 12 dodań i 5 usunięć

Wyświetl plik

@ -58,7 +58,12 @@ function getTarballManifest(tarballPath: string): Promise<Record<string, Buffer>
onentry: (entry) => {
entry.on('data', (data) => {
// we could hash these to reduce memory but it's probably fine
manifest[entry.path] = data
const existing = manifest[entry.path]
if (existing) {
manifest[entry.path] = Buffer.concat([existing, data])
} else {
manifest[entry.path] = data
}
})
},
},
@ -74,9 +79,10 @@ function getTarballManifest(tarballPath: string): Promise<Record<string, Buffer>
}
export async function didAnyPackageChange() {
const details = getAllPackageDetails()
const details = await getAllPackageDetails()
for (const pkg of Object.values(details)) {
if (await hasPackageChanged(pkg)) {
console.log('Package changed:', pkg.name)
return true
}
}

Wyświetl plik

@ -18,9 +18,6 @@ async function main() {
const latestVersionOnNpm = (await exec('npm', ['show', 'tldraw', 'version'])).trim()
const isLatestVersion = latestVersionInBranch.format() === latestVersionOnNpm
if (process.env.GITHUB_OUTPUT) {
appendFileSync(process.env.GITHUB_OUTPUT, `is_latest_version=${isLatestVersion}\n`)
}
const nextVersion = latestVersionInBranch.inc('patch').format()
// check we're on the main branch on HEAD
@ -53,6 +50,10 @@ async function main() {
return
}
if (process.env.GITHUB_OUTPUT) {
appendFileSync(process.env.GITHUB_OUTPUT, `is_latest_version=${isLatestVersion}\n`)
}
nicelog('Releasing version', nextVersion)
await setAllVersions(nextVersion)