Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nix-hashes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
on:
workflow_dispatch:
push:
branches: [dev]
branches: [dev, beta]
paths:
- "bun.lock"
- "package.json"
Expand Down
13 changes: 9 additions & 4 deletions script/beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,15 @@ async function main() {
await $`git fetch origin beta`

const localTree = await $`git rev-parse beta^{tree}`.text()
const remoteTree = await $`git rev-parse origin/beta^{tree}`.text()

if (localTree.trim() === remoteTree.trim()) {
console.log("Beta branch has identical contents, no push needed")
const remoteTrees = (await $`git log origin/dev..origin/beta --format=%T`.text()).split("\n")

const matchIdx = remoteTrees.indexOf(localTree.trim())
if (matchIdx !== -1) {
if (matchIdx !== 0) {
console.log(`Beta branch contains this sync, but additional commits exist after it. Leaving beta branch as is.`)
} else {
console.log("Beta branch has identical contents, no push needed")
}
return
}

Expand Down
Loading