Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display edition by version #2834

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
################################## Parameter Definition And Check ##########################################
# 1. 如果HEAD存在tag,则GIT_VERSION=<版本名称> <commit>
# 1. 如果HEAD存在tag,则GIT_VERSION=<版本名称>-<企业版/社区版> <commit>
# PS: 通常会在版本名称前增加字符“v”作为tag内容,当版本名称为 3.2411.0时,tag内容为v3.2411.0
# e.g. tag为v3.2411.0时,GIT_VERSION=3.2411.0 a6355ff4cf8d181315a2b30341bc954b29576b11
# e.g. tag为v3.2412.0-pre1-1时,GIT_VERSION=3.2412.0-pre1-1 f0bcb90e712cbdb6e16f122c1ebd623e90f9a905
# e.g. tag为v3.2411.0时,社区版:GIT_VERSION=3.2411.0-ce a6355ff4cf8d181315a2b30341bc954b29576b11
# e.g. tag为v3.2412.0-pre1-1时,社区版:GIT_VERSION=3.2412.0-pre1-1-ce f0bcb90e712cbdb6e16f122c1ebd623e90f9a905
# 2. 如果HEAD没有tag,则GIT_VERSION=<分支名> <commit>
# e.g. 分支名为main时,GIT_VERSION=main a6355ff4cf8d181315a2b30341bc954b29576b11
# e.g. 分支名为release-3.2411.x时,GIT_VERSION=release-3.2411.x a6355ff4cf8d181315a2b30341bc954b29576b11
override GIT_VERSION = $(shell if git describe --exact-match --tags >/dev/null 2>&1; then git describe --exact-match --tags | sed 's/^v//'; else git rev-parse --abbrev-ref HEAD; fi)${CUSTOM} $(shell git rev-parse HEAD)
override GIT_VERSION = $(shell if git describe --exact-match --tags >/dev/null 2>&1; then git describe --exact-match --tags | sed 's/^v//'; else git rev-parse --abbrev-ref HEAD; fi)-${EDITION}${CUSTOM} $(shell git rev-parse HEAD)
override GIT_COMMIT = $(shell git rev-parse HEAD)
override PROJECT_NAME = sqle
override LDFLAGS = -ldflags "-X 'main.version=${GIT_VERSION}'"
Expand Down
Loading