mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
fix: v2.9.4 (#4461)
Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
32
Makefile
32
Makefile
@ -10,6 +10,24 @@ tidy:
|
||||
lint:
|
||||
golangci-lint run -c .golangci.yml
|
||||
|
||||
# make branch to=v2.4.0
|
||||
.PHONY: branch
|
||||
branch:
|
||||
@set -e; \
|
||||
newVersion=$(to); \
|
||||
if [ -z "$$newVersion" ]; then \
|
||||
echo "Error: 'to' variable is required. Usage: make branch to=vX.Y.Z"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
branchName=fix/$$newVersion; \
|
||||
echo "Switching to master branch..."; \
|
||||
git checkout master; \
|
||||
echo "Pulling latest changes from master..."; \
|
||||
git pull origin master; \
|
||||
echo "Creating and switching to branch $$branchName from master..."; \
|
||||
git checkout -b $$branchName; \
|
||||
echo "Branch $$branchName created successfully!"
|
||||
|
||||
# make version to=v2.4.0
|
||||
.PHONY: version
|
||||
version:
|
||||
@ -18,6 +36,20 @@ version:
|
||||
./.make_version.sh ./ $$newVersion; \
|
||||
echo "make version to=$(to) done"
|
||||
|
||||
# make tag to=v2.4.0
|
||||
.PHONY: tag
|
||||
tag:
|
||||
@set -e; \
|
||||
newVersion=$(to); \
|
||||
echo "Switching to master branch..."; \
|
||||
git checkout master; \
|
||||
echo "Pulling latest changes from master..."; \
|
||||
git pull origin master; \
|
||||
echo "Creating annotated tag $$newVersion..."; \
|
||||
git tag -a $$newVersion -m "Release $$newVersion"; \
|
||||
echo "Pushing tag $$newVersion..."; \
|
||||
git push origin $$newVersion; \
|
||||
echo "Tag $$newVersion created and pushed successfully!"
|
||||
|
||||
# update submodules
|
||||
.PHONY: subup
|
||||
|
||||
Reference in New Issue
Block a user