commitizen
https://blog.csdn.net/weixin_43957384/article/details/129450648
git config --global core.autocrlf false
Host gitlab.cn
HostName gitlab.cn
User git
Port 222
git branch
git branch release/1.0.0-beta1
git checkout release/1.0.0-beta1
export GIT_SSH_COMMAND='ssh -p 222'
cp ../.gitlab-ci.yml .
goimports-reviser -company-prefixes github.com/bcds \
-project-name "NOT_PROJECT_NAME" \
-imports-order "std,project,company,general" \
-use-cache ./...
git.hyperchain.cn/bcds gitlab.bcds.org.cn/bcds
build: ci(*): add gitlab ci config and replace go mod reference path
git checkout master
git pull
npm run release -- --release-as 1.0.0-beta1
git push --follow-tags origin
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