-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (28 loc) · 1.13 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
KRONOS_VERSION=0.5.0
dev:
@env ENVIRONMENT=development go run ./cmd/kronosd/main.go
test-unit:
@go test --tags=unit ./...
test-acceptance:
@godog test/features
test-all:
@echo "======================== UNIT TESTS ======================== "
@go test --tags=unit ./...
@echo "======================== ACCEPTANCE TESTS ======================== "
@godog test/features
codecov:
@go test -covermode atomic -coverprofile coverage.txt ./...
lint:
@golangci-lint run
build-any:
@env ENVIRONMENT=production GOOS=$(GOOS) GOARCH=$(GOARCH) go build -tags $(GOOS) -ldflags "-s -w" -o build/kronosd ./cmd/kronosd
@env ENVIRONMENT=production GOOS=$(GOOS) GOARCH=$(GOARCH) go build -tags $(GOOS) -ldflags "-s -w" -o build/kronos ./cmd/kronoscli
release-darwin:
@env GOOS=darwin GOARCH=amd64 make build-any
@tar -czvf build/kronos-$(KRONOS_VERSION)-darwin_amd64.tar.gz build/*
release-linux:
@env GOOS=linux GOARCH=amd64 make build-any
@cp kronos.service build/kronos.service
@tar -czvf build/kronos-$(KRONOS_VERSION)-linux_amd64.tar.gz build/*
bump:
@sed -i -E 's/var\sversion\s.+/var version = "$(version)"/' ./internal/interfaces/cli/version_cmd.go