This commit is contained in:
1
2026-01-27 13:07:03 +00:00
parent 6939775ae8
commit aa425e0716

View File

@@ -98,15 +98,13 @@ steps:
GOSUMDB: off # 统一缩进6个空格
commands: # 子元素缩进4个空格
- mkdir -p build # commands内的项缩进6个空格
- source "$CI_ENV_FILE" # 加载环境变量缩进6个空格
- BIN_NAME="logic_${BUILD_VERSION}" # 缩进6个空格
- echo "BIN_NAME=${BIN_NAME}" >> "$CI_ENV_FILE" # 缩进6个空格
- BIN_NAME="logic_${CI_STEP_STARTED}" # 缩进6个空格
- | # 缩进6个空格
go build -v \
-p=4 \
-trimpath \
-buildvcs=false \
-ldflags "-s -w -buildid= -extldflags '-static' -X main.version=${BUILD_VERSION}" \
-ldflags "-s -w -buildid= -extldflags '-static' -X main.version=${CI_STEP_STARTED}" \
-o ./build/${BIN_NAME} \
./logic
- | # 缩进6个空格