Skip to content

Commit 2abbbfa

Browse files
committed
fix: clean up Makefile
1 parent 4ddfd7e commit 2abbbfa

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

Makefile

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
PKG_NAME = github.com/nasa9084/gac
2-
CMD_NAME = gac
3-
41
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)
152

163
.PHONY: test
174
test:
18-
@$(GO) test -v ./... --short
19-
20-
.PHONY: test-all
21-
test-all:
225
@$(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)

0 commit comments

Comments
 (0)