This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
48 lines (36 loc) · 1.47 KB
/
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
all: clean test \
bin/galasabld-linux-amd64 \
bin/galasabld-windows-amd64 \
bin/galasabld-darwin-amd64 \
bin/galasabld-linux-s390x \
bin/galasabld-darwin-arm64
src : ./Makefile \
./cmd/galasabld/main.go \
./pkg/cmd/*.go \
./pkg/galasayaml/*.go \
./pkg/githubjson/*.go \
./pkg/utils/*.go \
./pkg/versioning/*.go
test: src
bin/galasabld-linux-amd64 : src
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/galasabld-linux-amd64 ./cmd/galasabld
bin/galasabld-windows-amd64 : src
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/galasabld-windows-amd64 ./cmd/galasabld
bin/galasabld-darwin-amd64 : src
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o bin/galasabld-darwin-amd64 ./cmd/galasabld
bin/galasabld-darwin-arm64 : src
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o bin/galasabld-darwin-arm64 ./cmd/galasabld
bin/galasabld-linux-s390x : src
CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -o bin/galasabld-linux-s390x ./cmd/galasabld
test: src build/coverage.txt build/coverage.html build/coverage.out
build/coverage.out : src
mkdir -p build
go test -v -cover -coverprofile=build/coverage.out -coverpkg ./pkg/cmd,./pkg/galasayaml,./pkg/githubjson,./pkg/utils,./pkg/versioning ./pkg/...
build/coverage.html : build/coverage.out
go tool cover -html=build/coverage.out -o build/coverage.html
build/coverage.txt : build/coverage.out
go tool cover -func=build/coverage.out > build/coverage.txt
cat build/coverage.txt
clean:
rm -rf bin
rm -rf build/coverage.*