Refactoring (#17)
Reviewed-on: #17 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user