File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,11 @@ M = $(shell printf "\033[34;1m🐱\033[0m")
20
20
21
21
export GO111MODULE =on
22
22
23
+ COMMANDS =$(patsubst cmd/% ,% ,$(wildcard cmd/* ) )
24
+ BINARIES =$(addprefix bin/,$(COMMANDS ) )
25
+
23
26
.PHONY : all
24
- all : fmt lint | $(BIN ) ; $(info $(M ) building executable…) @ # # Build program binary
25
- $Q $(GO ) build \
26
- -tags release \
27
- -ldflags ' -X $(MODULE)/cmd.Version=$(VERSION) -X $(MODULE)/cmd.BuildDate=$(DATE)' \
28
- -o $(BIN ) /$(basename $(MODULE ) ) main.go
27
+ all : fmt $(BINARIES ) | $(BIN ) ; $(info $(M ) building executable…) @ # # Build program binary
29
28
30
29
$(BIN ) :
31
30
@mkdir -p $@
@@ -38,7 +37,7 @@ $(BIN)/%: | $(BIN) ; $(info $(M) building $(PACKAGE)…)
38
37
FORCE :
39
38
40
39
bin/% : cmd/% FORCE
41
- $(GO ) build -mod=vendor $(LDFLAGS ) -v -o $@ ./$<
40
+ $Q $ (GO ) build -mod=vendor $(LDFLAGS ) -v -o $@ ./$<
42
41
43
42
.PHONY : cross
44
43
cross : amd64 arm arm64 s390x ppc64le # # build cross platform binaries
You can’t perform that action at this time.
0 commit comments