feat: scripts.
This commit is contained in:
36
gitautotag.sh
Normal file
36
gitautotag.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
CURTAG=`git describe --abbrev=0 --tags`;
|
||||
CURTAG="${CURTAG/v/}"
|
||||
|
||||
IFS='.' read -a vers <<< "$CURTAG"
|
||||
|
||||
MAJ=${vers[0]}
|
||||
MIN=${vers[1]}
|
||||
BUG=${vers[2]}
|
||||
echo "Current Tag: v$MAJ.$MIN.$BUG"
|
||||
|
||||
for cmd in "$@"
|
||||
do
|
||||
case $cmd in
|
||||
"--major")
|
||||
# $((MAJ+1))
|
||||
((MAJ+=1))
|
||||
MIN=0
|
||||
BUG=0
|
||||
echo "Incrementing Major Version#"
|
||||
;;
|
||||
"--minor")
|
||||
((MIN+=1))
|
||||
BUG=0
|
||||
echo "Incrementing Minor Version#"
|
||||
;;
|
||||
"--bug")
|
||||
((BUG+=1))
|
||||
echo "Incrementing Bug Version#"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
NEWTAG="v$MAJ.$MIN.$BUG"
|
||||
echo "Adding Tag: $NEWTAG";
|
||||
git tag -a $NEWTAG -m $NEWTAG
|
||||
6
tag.bat
Normal file
6
tag.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
git tag v1.0.0
|
||||
git tag bank_card/v1.0.0
|
||||
git tag entgo/v1.0.0
|
||||
git tag geoip/v1.0.0
|
||||
|
||||
git push origin --tags
|
||||
11
upgrade.bat
Normal file
11
upgrade.bat
Normal file
@@ -0,0 +1,11 @@
|
||||
echo off
|
||||
|
||||
::指定起始文件夹
|
||||
set DIR="%cd%"
|
||||
|
||||
for /R %DIR% /d %%i in (*) do (
|
||||
echo %%i
|
||||
cd %%i
|
||||
go get all
|
||||
go mod tidy
|
||||
)
|
||||
Reference in New Issue
Block a user