diff options
| author | Aiden Cline <[email protected]> | 2025-12-23 12:45:31 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-23 12:45:34 -0600 |
| commit | 1995be359909a46ae941f890d59d7083d4c9c07a (patch) | |
| tree | 0a25b40cec9157b67c7ca5da1ecccc114c7ebb27 /script/sync-zed.ts | |
| parent | 86b9b7b15a40633172711f3525c8bc90b9bfbcc8 (diff) | |
| download | opencode-1995be359909a46ae941f890d59d7083d4c9c07a.tar.gz opencode-1995be359909a46ae941f890d59d7083d4c9c07a.zip | |
ci: update zed sync script
Diffstat (limited to 'script/sync-zed.ts')
| -rwxr-xr-x | script/sync-zed.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/script/sync-zed.ts b/script/sync-zed.ts index 752655447..b4a417ad8 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}` |
