2023-04-11 21:13:29 +08:00
|
|
|
SHELL := /bin/bash
|
2022-05-10 15:38:08 +08:00
|
|
|
|
2024-12-17 21:15:54 +08:00
|
|
|
# execute "go mod tidy" on all folders that have go.mod file
|
2022-05-10 15:38:08 +08:00
|
|
|
.PHONY: tidy
|
|
|
|
|
tidy:
|
2025-03-09 22:31:20 +08:00
|
|
|
./.make_tidy.sh
|
2022-05-10 15:38:08 +08:00
|
|
|
|
2024-12-17 21:15:54 +08:00
|
|
|
# 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
|
2022-11-01 20:12:21 +08:00
|
|
|
.PHONY: lint
|
|
|
|
|
lint:
|
2024-12-11 10:14:12 +08:00
|
|
|
golangci-lint run -c .golangci.yml
|
2023-03-28 09:25:29 +08:00
|
|
|
|
2025-10-11 14:58:01 +08:00
|
|
|
# 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!"
|
|
|
|
|
|
2023-04-14 10:09:19 +08:00
|
|
|
# make version to=v2.4.0
|
2023-04-24 11:44:19 +08:00
|
|
|
.PHONY: version
|
2023-04-14 10:09:19 +08:00
|
|
|
version:
|
2023-03-28 09:25:29 +08:00
|
|
|
@set -e; \
|
2023-04-14 10:09:19 +08:00
|
|
|
newVersion=$(to); \
|
2026-05-14 15:34:43 +08:00
|
|
|
$(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
|
|
|
|
2025-10-11 14:58:01 +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
|
|
|
|
2026-01-07 17:32:16 +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
|