mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
ci: update zed sync script
This commit is contained in:
@@ -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 "d@ironbay.co"`
|
||||
await $`git config user.name "Aiden Cline"`
|
||||
await $`git config user.email "63023139+rekram1-node@users.noreply.github.com "`
|
||||
|
||||
// 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}`
|
||||
|
||||
Reference in New Issue
Block a user