-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 740 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 740 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
BINARY_DIR=out/bin
BINARY_NAME=${BINARY_DIR}/fjira
all: clean install test build
build_run: clean build run
install:
go mod vendor
build:
mkdir -p ${BINARY_DIR}
go build -o ${BINARY_NAME} cmd/fjira-cli/main.go
chmod +x ${BINARY_NAME}
build_windows:
mkdir -p ${BINARY_DIR}
GOOS=windows GOARCH=amd64 go build -o ${BINARY_NAME}.exe cmd/fjira-cli/main.go
chmod +x ${BINARY_NAME}.exe
run:
./${BINARY_NAME}
test:
go test ./internal/...
test_coverage:
go test -coverpkg=./... -covermode=count -coverprofile=coverage.out ./internal/...
go tool cover -html=coverage.out -o=coverage.html
go tool cover -func coverage.out
release:
goreleaser release --skip-publish --snapshot --rm-dist
clean:
rm -rf ${BINARY_DIR}
rm -rf dist