Skip to content

Commit fc5bf93

Browse files
committed
chore: update Makefile
1 parent 8d2fd27 commit fc5bf93

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

‎Makefile‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
NAME := s3bytes
2-
BIN := $(NAME)
3-
ifeq ($(OS),Windows_NT)
4-
BIN := $(BIN).exe
5-
endif
6-
72
CMD_PATH := ./cmd/$(NAME)/
83
GOBIN ?= $(shell go env GOPATH)/bin
94
VERSION := $$(make -s show-version)
10-
REVISION := $$(git rev-parse --short HEAD)
5+
REVISION := $(shell git rev-parse --short HEAD)
116
LDFLAGS := "-s -w -X main.Version=$(VERSION) -X main.Revision=$(REVISION)"
127

138
HAS_LINT := $(shell command -v $(GOBIN)/golangci-lint 2> /dev/null)
@@ -23,11 +18,7 @@ export GO111MODULE=on
2318
.PHONY: build
2419
build: clean
2520
go mod tidy
26-
go build -ldflags $(LDFLAGS) -o $(BIN) $(CMD_PATH)
27-
28-
.PHONY: put
29-
put: build
30-
cp $(BIN) $(GOBIN)/$(BIN)
21+
go build -ldflags $(LDFLAGS) -o $(NAME) $(CMD_PATH)
3122

3223
.PHONY: check
3324
check: test cover bench vet golangci-lint govulncheck
@@ -103,4 +94,4 @@ release: check-git
10394
.PHONY: clean
10495
clean:
10596
go clean
106-
rm -f $(BIN) cover.out cover.html cpu.prof mem.prof $(NAME).test
97+
rm -f $(NAME) cover.out cover.html cpu.prof mem.prof $(NAME).test

0 commit comments

Comments
 (0)
⌂ 换网址