Skip to content

Commit b802242

Browse files
committed
dump add inFile
1 parent 02df329 commit b802242

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/tag_release.sh

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/usr/bin/env bash
2+
3+
# 检查是否有未提交的内容
4+
if [[ $(git status) =~ "modified:" ]]; then
5+
echo "git is currently in a dirty state"
6+
exit
7+
fi
8+
29
# 从HISTORY.md中进行版本提取
310
if [[ ! -f HISTORY.md ]]; then
411
echo "cannot found HISTORY.md file"
@@ -17,6 +24,11 @@ if [[ $COMMENT == "" || $COMMENT == " " ]]; then
1724
exit
1825
fi
1926

27+
TAG=$(git tag --list "$VERSION")
28+
if [[ $TAG == *"$VERSION"* ]]; then
29+
git tag -d "$VERSION"
30+
fi
31+
2032
git tag -a "$VERSION" -m "$COMMENT"
2133
git push origin "$VERSION"
2234
goreleaser release --rm-dist --debug

0 commit comments

Comments
 (0)