forked from peak/s5cmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (38 loc) · 910 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
default: all
.PHONY: all
all: clean build test check
.PHONY: build
build:
@go build ${GCFLAGS} -ldflags "${LDFLAGS}" .
.PHONY: test
test:
@go test -mod=vendor -count=1 ./...
.PHONY: check
check: vet staticcheck unparam check-fmt
.PHONY: staticcheck
staticcheck:
@staticcheck -checks 'all,-U1000,-ST1000,-ST1003' ./...
.PHONY: unparam
unparam:
@unparam ./...
.PHONY: vet
vet:
@go vet -mod=vendor ./...
.PHONY: check-fmt
check-fmt:
@sh -c 'if [ -n "$(go fmt -mod=vendor ./...)" ]; then echo "Go code is not formatted"; exit 1; fi'
.PHONY: mock
mock:
@mockery -inpkg -dir=storage -name=Storage -case=underscore
.PHONY: clean
clean:
@rm -f ./s5cmd
.PHONY: release
release:
@echo "Latest tag is" $$(git describe --tags)
@echo "Are you sure you want to release '$$version'? [y/N]" && read ans && [ $${ans:-N} = y ]
rm -rf ./dist/
git tag $$version
git push --tags
goreleaser
.NOTPARALLEL: