commitizen

https://blog.csdn.net/weixin_43957384/article/details/129450648

 

 


git fetch --all --tags --prune
git tag -l | xargs -n 1 git push --delete origin
git tag | xargs git tag -d

git add .
git commit --amend

  git checkout master
git pull

git tag v1.0.0-alpha1
git push
git push --tags

git checkout develop
git branch release/1.0.0-alpha1
git checkout release/1.0.0-alpha1


npm run release -- --release-as 1.0.0-alpha1

go clean -modcache



find -s . -name *.proto



goimports-reviser -company-prefixes github.com/bcds \
-project-name "NOT_PROJECT_NAME" \
-imports-order "std,project,company,general" \
-use-cache ./...



st=0
counter=0

echo "1. gofmt.."
find . -path '*/vendor/*' -prune -o -name '*.go' -type f -exec gofmt -s -w {} \;
[ $? -ne 0 ] && exit 1

echo "2. goimports-reviser.."

if ! command -v $GOPATH/bin/goimports-reviser &> /dev/null; then
echo "goimports-reviser may not be installed yet, you could install it by [go install -v github.com/incu6us/goimports-reviser/v3@latest]" >&2
exit 1
fi

git diff --name-only --cached | while read file
do
if [[ $file == *.go ]] && [ -f "$file" ]; then
echo "goimports-reviser $file"
$GOPATH/bin/goimports-reviser -company-prefixes github.com/bcds -project-name "NOT_PROJECT_NAME" -imports-order "std,project,company,general" -use-cache "$file"
fi
done

# add formatted files
git add -u
posted @ 2023-12-14 10:08  zJanly  阅读(1)  评论(0编辑  收藏  举报