Skip to content

Commit

Permalink
Add build_amd64_static action to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Dec 5, 2024
1 parent 985dd71 commit c46969a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ifdef TAG
sed -i -e "s,$(TAG),{{VERSION}},g" main.go
endif

build_all: golib build_darwin_amd64 build_darwin_arm64 build_amd64 build_arm64 build_power8 build_windows_amd64 build_windows_arm64 changes
build_all: golib build_darwin_amd64 build_darwin_arm64 build_amd64 build_amd64_static build_arm64 build_power8 build_windows_amd64 build_windows_arm64 changes

build_darwin_amd64:
ifdef TAG
Expand Down Expand Up @@ -53,6 +53,16 @@ ifdef TAG
sed -i -e "s,$(TAG),{{VERSION}},g" main.go
endif

build_amd64_static:
ifdef TAG
sed -i -e "s,{{VERSION}},$(TAG),g" main.go
endif
go clean; rm -rf pkg srv_linux; CGO_ENABLED=0 GOOS=linux go build -tags static -o srv ${flags}
mv srv srv_amd64_static
ifdef TAG
sed -i -e "s,$(TAG),{{VERSION}},g" main.go
endif

build_power8:
ifdef TAG
sed -i -e "s,{{VERSION}},$(TAG),g" main.go
Expand Down

0 comments on commit c46969a

Please sign in to comment.