Skip to content

The open source coding agent.

TypeScript

ci: update zed sync script

Aiden Cline1995be359909
diff --git a/script/sync-zed.ts b/script/sync-zed.ts
index 7526554477f..b4a417ad8b9 100755
--- a/script/sync-zed.ts
+++ b/script/sync-zed.ts
@@ -10,10 +10,10 @@ const EXTENSION_NAME = "opencode"
async function main() {
const version = process.argv[2]
- if (!version) throw new Error("Version argument required: bun script/sync-zed.ts v1.0.52")
+ if (!version) throw new Error("Version argument required, ex: bun script/sync-zed.ts v1.0.52")
- const token = process.env.GITHUB_TOKEN
- if (!token) throw new Error("GITHUB_TOKEN environment variable required")
+ const token = process.env.ZED_EXTENSIONS_PAT
+ if (!token) throw new Error("ZED_EXTENSIONS_PAT environment variable required")
const cleanVersion = version.replace(/^v/, "")
console.log(`πŸ“¦ Syncing Zed extension for version ${cleanVersion}`)
@@ -39,17 +39,17 @@ async function main() {
process.chdir(workDir)
// Configure git identity
- await $`git config user.name "Dax Raad"`
- await $`git config user.email "[email protected]"`
+ await $`git config user.name "Aiden Cline"`
+ await $`git config user.email "[email protected] "`
- // Sync fork with upstream
+ // Sync fork with upstream (force reset to match exactly)
console.log(`πŸ”„ Syncing fork with upstream...`)
await $`git remote add upstream https://github.com/${UPSTREAM_REPO}.git`
await $`git fetch upstream`
await $`git checkout main`
- await $`git merge upstream/main --ff-only`
- await $`git push origin main`
- console.log(`βœ… Fork synced`)
+ await $`git reset --hard upstream/main`
+ await $`git push origin main --force`
+ console.log(`βœ… Fork synced (force reset to upstream)`)
// Create a new branch
const branchName = `update-${EXTENSION_NAME}-${cleanVersion}`