Skip to content

Commit f8bcf01

Browse files
anandgupta42claude
andcommitted
fix: prevent upstream tags from polluting origin
Multiple scripts and CI workflows were fetching/pushing tags in ways that caused ~900 upstream OpenCode tags to leak into our origin remote: - CI `git fetch upstream` auto-followed tags — added `--no-tags` - Release scripts used `git push --tags` pushing ALL local tags to origin — changed to push only the specific new tag - Release scripts used `git fetch --force --tags` without explicit remote — added explicit `origin` - `script/publish.ts` used `--tags` flag — push only `v${version}` - Docs referenced `git fetch upstream --tags` — fixed to `--no-tags` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 581ef2c commit f8bcf01

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
- name: Add upstream remote
9595
run: |
9696
git remote add upstream https://github.com/anomalyco/opencode.git || true
97-
git fetch upstream --quiet
97+
git fetch upstream --quiet --no-tags
9898
9999
- name: Install merge tooling deps
100100
run: bun install

RELEASING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Add a new section at the top of `CHANGELOG.md`:
6969
git add -A
7070
git commit -m "release: v0.2.0"
7171
git tag v0.2.0
72-
git push origin main --tags
72+
git push origin main v0.2.0
7373
```
7474

7575
### 4. What happens automatically
@@ -111,7 +111,7 @@ bun run packages/altimate-code/script/bump-version.ts --engine 0.2.1
111111
git add -A
112112
git commit -m "release: engine-v0.2.1"
113113
git tag engine-v0.2.1
114-
git push origin main --tags
114+
git push origin main engine-v0.2.1
115115
```
116116

117117
This triggers `.github/workflows/publish-engine.yml` which publishes only to PyPI.

github/script/release

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ while [ "$#" -gt 0 ]; do
1010
done
1111

1212
# Get the latest Git tag
13-
git fetch --force --tags
13+
git fetch origin --force --tags
1414
latest_tag=$(git tag --sort=committerdate | grep -E '^github-v[0-9]+\.[0-9]+\.[0-9]+$' | tail -1)
1515
if [ -z "$latest_tag" ]; then
1616
echo "No tags found"
@@ -38,4 +38,4 @@ echo "New version: $new_version"
3838

3939
# Tag
4040
git tag $new_version
41-
git push --tags
41+
git push origin "$new_version"

script/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if (Script.release) {
6363
await $`git tag v${Script.version}`
6464
await $`git fetch origin`
6565
await $`git cherry-pick HEAD..origin/dev`.nothrow()
66-
await $`git push origin HEAD --tags --no-verify --force-with-lease`
66+
await $`git push origin HEAD v${Script.version} --no-verify --force-with-lease`
6767
await new Promise((resolve) => setTimeout(resolve, 5_000))
6868
}
6969

script/upstream/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Run `bun run script/upstream/analyze.ts --branding --verbose` to see details. Co
283283

284284
```bash
285285
git remote add upstream https://github.com/anomalyco/opencode.git
286-
git fetch upstream --tags
286+
git fetch upstream --no-tags
287287
```
288288

289289
### Aborting a merge

sdks/vscode/script/release

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ while [ "$#" -gt 0 ]; do
1010
done
1111

1212
# Get the latest Git tag
13-
git fetch --force --tags
13+
git fetch origin --force --tags
1414
latest_tag=$(git tag --sort=committerdate | grep -E '^vscode-v[0-9]+\.[0-9]+\.[0-9]+$' | tail -1)
1515
if [ -z "$latest_tag" ]; then
1616
echo "No tags found"
@@ -38,4 +38,4 @@ echo "New version: $new_version"
3838

3939
# Tag
4040
git tag $new_version
41-
git push --tags
41+
git push origin "$new_version"

0 commit comments

Comments
 (0)