Skip to content

Commit 756a856

Browse files
committed
chore: delete existing git tag and branch if already exist
1 parent c31ca0a commit 756a856

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@ generate: clone
2121
pkger
2222

2323
.PHONY: release
24-
release: generate
24+
release: generate _release
25+
26+
.PHONY: _release
27+
_release:
28+
git branch -D $(GIT_BRANCH) || true
2529
git checkout -b $(GIT_BRANCH)
30+
pkger
2631
git add -f pkged.go
2732
touch clone/go.mod
2833
go mod tidy
2934
git commit -sam "chore: generate release ($(WEBUI_REF))"
30-
git push -u origin $(GIT_BRANCH)
35+
git push -u origin $(GIT_BRANCH) -f
36+
git tag -d $(GIT_TAG) || true
3137
git tag $(GIT_TAG)
32-
git push --tags
38+
git push --tags -f
3339
git checkout master
3440

3541
.PHONY: re

0 commit comments

Comments
 (0)