Skip to content

Commit 77010d9

Browse files
committed
fix: avoid nested tag in floating major tag update
1 parent dadca6c commit 77010d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/release.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def main() -> None:
114114
result = subprocess.run(
115115
["git", "tag", "-a", tag, "-m", f"release: {version}"],
116116
cwd=REPO_ROOT,
117+
env={**__import__("os").environ, "GIT_EDITOR": "true"},
117118
)
118119
if result.returncode != 0:
119120
print(f"\nERROR: git tag failed (exit {result.returncode})", file=sys.stderr)
@@ -130,7 +131,7 @@ def main() -> None:
130131

131132
# Update floating major tag (e.g. v1 -> v1.0.4)
132133
print(f"Updating floating tag {major_tag} -> {tag}...", flush=True)
133-
subprocess.run(["git", "tag", "-f", major_tag, tag], cwd=REPO_ROOT)
134+
subprocess.run(["git", "tag", "-f", major_tag, f"{tag}^{{}}"], cwd=REPO_ROOT)
134135
result = subprocess.run(
135136
["git", "push", "origin", major_tag, "--force"],
136137
cwd=REPO_ROOT,

0 commit comments

Comments
 (0)