-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·40 lines (32 loc) · 814 Bytes
/
Makefile
File metadata and controls
executable file
·40 lines (32 loc) · 814 Bytes
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
.NOTPARALLEL:
GO_PACKAGE_PREFIX := github.com/matthewrsj/copy
.PHONY: check
.DEFAULT_GOAL := check
check:
go test -cover ${GO_PACKAGE_PREFIX}/...
# TODO: since Go 1.10 we have support for passing multiple packages
# to coverprofile. Update this to work on all packages.
.PHONY: checkcoverage
checkcoverage:
go test -cover . -coverprofile=coverage.out
go tool cover -html=coverage.out
.PHONY: lint
lint:
@golangci-lint run ./...
clean:
ifeq (,${LOCAL_GOPATH})
go clean -i -x
else
rm -rf ${LOCAL_GOPATH}
endif
rm -f copy-*.tar.gz
release:
@if [ ! -d .git ]; then \
echo "Release needs to be used from a git repository"; \
exit 1; \
fi
@VERSION=0.0.1
if [ -z "$$VERSION" ]; then \
exit 1; \
fi; \
git archive --format=tar.gz --verbose -o copy-$$VERSION.tar.gz HEAD --prefix=copy-$$VERSION/