Skip to content

Commit ea64e8f

Browse files
committed
feat(hooks): delete first release tag on regenerate
1 parent 8fa0c77 commit ea64e8f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

hooks/post_gen_project.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,20 @@ def run_post_gen_hook():
200200
)
201201

202202
if os.environ.get("SKIP_GIT_PUSH") != "true":
203-
# TODO: Remove --force; just for testing
204203
subprocess.run(
205204
["git", "push", "--set-upstream", "origin", "main", "--force"],
206205
capture_output=True,
207206
check=True,
208207
)
209208

209+
# Cleanup the v0.1.0 tag if it already exists, so the following release will succeed and repoint the tag if it's this is a regeneration
210+
subprocess.run(
211+
["git", "push", "--delete", "origin", "v0.1.0"],
212+
check=False,
213+
stdout=subprocess.DEVNULL,
214+
stderr=subprocess.DEVNULL,
215+
)
216+
210217
# Cut an initial release
211218
subprocess.run(
212219
["task", "release"],

0 commit comments

Comments
 (0)