chore: cleanup makefile, remove unnecessary scripts (#4684)

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%开源和免费".
This commit is contained in:
John Guo
2026-02-11 14:37:49 +08:00
committed by GitHub
parent d5633ebad7
commit 98fd2a1973
5 changed files with 25 additions and 39 deletions

View File

@ -1,5 +1,16 @@
#!/usr/bin/env bash
# Function to run sed in-place with OS-specific options
sed_replace() {
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS - requires empty string after -i
sed -i '' "$@"
else
# Linux/Windows Git Bash
sed -i "$@"
fi
}
workdir=.
echo "Prepare to tidy all go.mod files in the ${workdir} directory"
@ -27,9 +38,9 @@ for file in `find ${workdir} -name go.mod`; do
cd $goModPath
# Remove indirect dependencies
sed -i '/\/\/ indirect/d' go.mod
sed_replace '/\/\/ indirect/d' go.mod
go mod tidy
# Remove toolchain line if exists
sed -i '' '/^toolchain/d' go.mod
sed_replace '/^toolchain/d' go.mod
cd - > /dev/null
done

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Function to run sed in-place with OS-specific options
sed_inplace() {
sed_replace() {
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS - requires empty string after -i
sed -i '' "$@"
@ -40,11 +40,11 @@ fi
if [[ true ]]; then
# Use sed to replace the version number in version.go
sed_inplace 's/VERSION = ".*"/VERSION = "'${newVersion}'"/' version.go
sed_replace 's/VERSION = ".*"/VERSION = "'${newVersion}'"/' version.go
# Use sed to replace the version number in README.MD
sed_inplace 's/version=[^"]*/version='${newVersion}'/' README.MD
sed_inplace 's/version=[^"]*/version='${newVersion}'/' README.zh_CN.MD
sed_replace 's/version=[^"]*/version='${newVersion}'/' README.MD
sed_replace 's/version=[^"]*/version='${newVersion}'/' README.zh_CN.MD
fi
if [ -f "go.work" ]; then
@ -81,20 +81,20 @@ for file in `find ${workdir} -name go.mod`; do
go mod edit -replace github.com/gogf/gf/contrib/drivers/sqlite/v2=../../contrib/drivers/sqlite
fi
# Remove indirect dependencies
sed_inplace '/\/\/ indirect/d' go.mod
sed_replace '/\/\/ indirect/d' go.mod
go mod tidy
# Remove toolchain line if exists
sed_inplace '/^toolchain/d' go.mod
sed_replace '/^toolchain/d' go.mod
# Upgrading only GoFrame related libraries, sometimes even if a version number is specified,
# it may not be possible to successfully upgrade. Please confirm before submitting the code
go list -f "{{if and (not .Indirect) (not .Main)}}{{.Path}}@${newVersion}{{end}}" -m all | grep "^github.com/gogf/gf"
go list -f "{{if and (not .Indirect) (not .Main)}}{{.Path}}@${newVersion}{{end}}" -m all | grep "^github.com/gogf/gf" | xargs -L1 go get -v
# Remove indirect dependencies
sed_inplace '/\/\/ indirect/d' go.mod
sed_replace '/\/\/ indirect/d' go.mod
go mod tidy
# Remove toolchain line if exists
sed_inplace '/^toolchain/d' go.mod
sed_replace '/^toolchain/d' go.mod
if [ $goModPath = "./cmd/gf" ]; then
go mod edit -dropreplace github.com/gogf/gf/v2
go mod edit -dropreplace github.com/gogf/gf/contrib/drivers/clickhouse/v2

View File

@ -52,31 +52,6 @@ tag:
git push origin $$newVersion; \
echo "Tag $$newVersion created and pushed successfully!"
# update submodules
.PHONY: subup
subup:
@set -e; \
echo "Updating submodules..."; \
git submodule init;\
git submodule update;
# update and commit submodules
.PHONY: subsync
subsync: subup
@set -e; \
echo "";\
cd examples; \
echo "Checking for changes..."; \
if git diff-index --quiet HEAD --; then \
echo "No changes to commit"; \
else \
echo "Found changes, committing..."; \
git add -A; \
git commit -m "examples update"; \
git push origin; \
fi; \
cd ..;
# manage docker services for local development
# usage: make docker or make docker cmd=start svc=mysql
.PHONY: docker

View File

@ -1,7 +1,7 @@
English | [简体中文](README.zh_CN.MD)
<div align=center>
<img src="https://goframe.org/img/logo_full.png" width="300" alt="goframe gf logo"/>
<img src="https://goframe.org/img/logo_full.png" width="300" alt="goframe logo"/>
[![Go Reference](https://pkg.go.dev/badge/github.com/gogf/gf/v2.svg)](https://pkg.go.dev/github.com/gogf/gf/v2)
[![GoFrame CI](https://github.com/gogf/gf/actions/workflows/ci-main.yml/badge.svg)](https://github.com/gogf/gf/actions/workflows/ci-main.yml)

View File

@ -1,7 +1,7 @@
[English](README.MD) | 简体中文
<div align=center>
<img src="https://goframe.org/img/logo_full.png" width="300" alt="goframe gf logo"/>
<img src="https://goframe.org/img/logo_full.png" width="300" alt="goframe logo"/>
[![Go Reference](https://pkg.go.dev/badge/github.com/gogf/gf/v2.svg)](https://pkg.go.dev/github.com/gogf/gf/v2)
[![GoFrame CI](https://github.com/gogf/gf/actions/workflows/ci-main.yml/badge.svg)](https://github.com/gogf/gf/actions/workflows/ci-main.yml)
@ -23,7 +23,7 @@
</div>
强大的框架,为了更快、更轻松、更高效的项目开发。
强大的框架,为了更快、更轻松、更高效的项目开发。
## 安装
@ -51,4 +51,4 @@ go get -u github.com/gogf/gf/v2
## 许可证
`GoFrame` 采用 [MIT License](LICENSE) 许可100% 免费和开源,永久保持
`GoFrame` 采用 [MIT License](LICENSE) 许可100%开源和免费