-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
36 lines (26 loc) · 832 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
VERSION := $(shell git describe --always --tags --dirty)
ldflags := "-X github.com/wtsi-npg/valet/valet.Version=${VERSION}"
build_path = "build/valet-${VERSION}"
.PHONY: build coverage dist install lint test check clean
all: build
install:
go install -ldflags ${ldflags}
build:
mkdir -p ${build_path}
go build -v -ldflags ${ldflags} -o ${build_path}/valet github.com/wtsi-npg/valet
lint:
golangci-lint run ./...
check: test
test:
ginkgo -r --race
coverage:
ginkgo -r --cover -coverprofile=coverage.out
dist: build test
cp README.md COPYING ${build_path}
mkdir ${build_path}/scripts
cp scripts/valet_archive_create.sh ${build_path}/scripts/
tar -C ./build -cvj -f valet-${VERSION}.tar.bz2 valet-${VERSION}
shasum -a 256 valet-${VERSION}.tar.bz2 > valet-${VERSION}.tar.bz2.sha256
clean:
go clean
rm -rf build/*