Refactoring (#17)

Reviewed-on: #17
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-11-27 02:10:51 +00:00
committed by phoenix
parent fc1f3fa814
commit 18d1d2730f
8 changed files with 20 additions and 19 deletions
+10 -9
View File
@@ -6,16 +6,17 @@ GO_VERSION ?= $(shell go version | awk '{print $$3}')
.PHONY: build
build:
go build -ldflags="\
-X 'git.kundeng.us/phoenix/clean_file/version.Version=$(VERSION)' \
-X 'git.kundeng.us/phoenix/clean_file/version.BuildTime=$(BUILD_TIME)' \
-X 'git.kundeng.us/phoenix/clean_file/version.Commit=$(COMMIT)' \
-X 'git.kundeng.us/phoenix/clean_file/version.GoVersion=$(GO_VERSION)'" \
-o clean_file main.go
-X 'git.kundeng.us/phoenix/clean_file/internal/version.Version=$(VERSION)' \
-X 'git.kundeng.us/phoenix/clean_file/internal/version.BuildTime=$(BUILD_TIME)' \
-X 'git.kundeng.us/phoenix/clean_file/internal/version.Commit=$(COMMIT)' \
-X 'git.kundeng.us/phoenix/clean_file/internal/version.GoVersion=$(GO_VERSION)'" \
-o clean_file cmd/clean_file/main.go
.PHONY: install
install:
go install -ldflags="\
-X 'git.kundeng.us/phoenix/clean_file/version.Version=$(VERSION)' \
-X 'git.kundeng.us/phoenix/clean_file/version.BuildTime=$(BUILD_TIME)' \
-X 'git.kundeng.us/phoenix/clean_file/version.Commit=$(COMMIT)' \
-X 'git.kundeng.us/phoenix/clean_file/version.GoVersion=$(GO_VERSION)'"
-X 'git.kundeng.us/phoenix/clean_file/internal/version.Version=$(VERSION)' \
-X 'git.kundeng.us/phoenix/clean_file/internal/version.BuildTime=$(BUILD_TIME)' \
-X 'git.kundeng.us/phoenix/clean_file/internal/version.Commit=$(COMMIT)' \
-X 'git.kundeng.us/phoenix/clean_file/internal/version.GoVersion=$(GO_VERSION)'"
-o clean_file cmd/clean_file/main.go