GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: skip force push when beta branch is unchanged · bzbetty/opencode@3ab41d5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • script
    • beta.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎script/beta.ts‎

Copy file name to clipboardExpand all lines: script/beta.ts
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,18 @@ async function main() {
124124
throw new Error(`${failed.length} PR(s) failed to merge`)
125125
}
126126

127-
console.log("\nForce pushing beta branch...")
127+
console.log("\nChecking if beta branch has changes...")
128+
await $`git fetch origin beta`
129+
130+
const localTree = await $`git rev-parse beta^{tree}`.text()
131+
const remoteTree = await $`git rev-parse origin/beta^{tree}`.text()
132+
133+
if (localTree.trim() === remoteTree.trim()) {
134+
console.log("Beta branch has identical contents, no push needed")
135+
return
136+
}
137+
138+
console.log("Force pushing beta branch...")
128139
await $`git push origin beta --force --no-verify`
129140

130141
console.log("Successfully synced beta branch")

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.