Files
gf/Makefile

65 lines
1.7 KiB
Makefile
Raw Permalink Normal View History

SHELL := /bin/bash
# execute "go mod tidy" on all folders that have go.mod file
.PHONY: tidy
tidy:
2025-03-09 22:31:20 +08:00
./.make_tidy.sh
# execute "golangci-lint" to check code style
feat(‎crypto/grsa): Add RSA encryption and decryption function (#4571) 补充RSA加密解密功能 This pull request improves documentation and developer onboarding for the project, with a particular focus on the RSA cryptography package and general installation instructions. The main changes include the addition of a comprehensive README for the `grsa` RSA package, updated installation steps in both English and Chinese documentation, and minor clarifications to documentation links. **Documentation improvements:** * Added a detailed `README.md` for the `crypto/grsa` package, including features, security considerations, usage examples, API descriptions, key format explanations, and error handling guidance. * Updated the English (`README.MD`) and Chinese (`README.zh_CN.MD`) documentation to include a clear installation section with `go get` instructions for easier onboarding. [[1]](diffhunk://#diff-01e6d9ffed056a02cae8d8a0ec5d476a64d017bf85c0d5a94bb23ca21f33f5aaR27-R32) [[2]](diffhunk://#diff-c93759cb9a9500f20e551c741eb167fc72825fd638d36121357feb8253ce6ac1R27-R41) * Clarified and improved documentation links in both English and Chinese README files, including the addition of a link to the documentation source and improved naming for the GoDoc/Go package documentation. [[1]](diffhunk://#diff-01e6d9ffed056a02cae8d8a0ec5d476a64d017bf85c0d5a94bb23ca21f33f5aaR41) [[2]](diffhunk://#diff-c93759cb9a9500f20e551c741eb167fc72825fd638d36121357feb8253ce6ac1R27-R41) **Developer tooling:** * Added a commented-out `go install` command for `golangci-lint` in the `Makefile` to assist developers in setting up linting tools. --------- Co-authored-by: hailaz <739476267@qq.com>
2025-12-26 18:18:30 +08:00
# 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
2023-04-24 11:44:19 +08:00
.PHONY: version
version:
@set -e; \
newVersion=$(to); \
$(MAKE) -C cmd/gf pack; \
2025-03-09 22:31:20 +08:00
./.make_version.sh ./ $$newVersion; \
2023-06-06 17:10:32 +08:00
echo "make version to=$(to) done"
2025-02-27 14:35:00 +08:00
# 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!"
2025-02-27 14:35:00 +08:00
# 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