mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
This pull request primarily removes submodule management targets from the `Makefile` and makes minor updates to the project documentation in both English and Chinese. The most important changes are grouped below. Makefile cleanup: * Removed the `subup` and `subsync` targets from the `Makefile`, eliminating commands related to updating and committing submodules. Documentation updates: * Updated the logo alt text in both `README.MD` and `README.zh_CN.MD` from "goframe gf logo" to "goframe logo" for clarity. [[1]](diffhunk://#diff-01e6d9ffed056a02cae8d8a0ec5d476a64d017bf85c0d5a94bb23ca21f33f5aaL4-R4) [[2]](diffhunk://#diff-c93759cb9a9500f20e551c741eb167fc72825fd638d36121357feb8253ce6ac1L4-R4) * Revised a description in `README.zh_CN.MD` to clarify the framework's purpose, changing “一个强大的框架” to “一款强大的框架”. * Simplified the license description in `README.zh_CN.MD` to state "100%开源和免费".
64 lines
1.7 KiB
Makefile
64 lines
1.7 KiB
Makefile
SHELL := /bin/bash
|
|
|
|
# execute "go mod tidy" on all folders that have go.mod file
|
|
.PHONY: tidy
|
|
tidy:
|
|
./.make_tidy.sh
|
|
|
|
# execute "golangci-lint" to check code style
|
|
# go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
|
|
.PHONY: lint
|
|
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:
|
|
@set -e; \
|
|
newVersion=$(to); \
|
|
./.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!"
|
|
|
|
# manage docker services for local development
|
|
# usage: make docker or make docker cmd=start svc=mysql
|
|
.PHONY: docker
|
|
docker:
|
|
@if [ -z "$(cmd)" ]; then \
|
|
./.github/workflows/scripts/docker-services.sh; \
|
|
else \
|
|
./.github/workflows/scripts/docker-services.sh $(cmd) $(svc) $(extra); \
|
|
fi
|