File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 1
- PKG_NAME = github.com/nasa9084/gac
2
- CMD_NAME = gac
3
-
4
1
GO ?= go
5
- BIN_DIR = $(PWD ) /bin
6
- VERSION ?= $(shell git describe --tags --abbrev=0)
7
- REVISION ?= $(shell git rev-parse --short HEAD)
8
- LDFLAGS = -ldflags "-X $(PKG_NAME ) /commands.Version=$(VERSION ) -X $(PKG_NAME ) /commands.Revision=$(REVISION ) "
9
- SRCS = $(foreach dir,$(shell find . -type d) ,$(wildcard $(dir ) /* .go) )
10
-
11
- all : clean test build
12
-
13
- .PHONY : build
14
- build : $(BIN_DIR ) /$(CMD_NAME )
15
2
16
3
.PHONY : test
17
4
test :
18
- @$(GO ) test -v ./... --short
19
-
20
- .PHONY : test-all
21
- test-all :
22
5
@$(GO ) test -v ./...
23
-
24
- .PHONY : clean
25
- clean :
26
- @-rm -fr $(BIN_DIR )
27
-
28
- $(BIN_DIR ) /$(CMD_NAME ) : $(SRCS )
29
- @mkdir -p $(BIN_DIR )
30
- @$(GO ) build $(LDFLAGS ) -o $(BIN_DIR ) /$(CMD_NAME )
You can’t perform that action at this time.
0 commit comments