-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (44 loc) · 1.28 KB
/
Makefile
File metadata and controls
59 lines (44 loc) · 1.28 KB
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
49
50
51
52
53
54
55
56
57
58
59
all: build-cli build-service
build-cli:
cd cli && go build -v && mv cli ../oms-cli
build-service:
cd service && go build -v && mv service ../oms-service
test:
go test -count=1 -v ./...
test-cli:
# -count=1 to disable caching test results
go test -count=1 -v ./cli/...
test-integration:
# Run integration tests with build tag
go test -count=1 -v -tags=integration ./cli/...
test-service:
go test -count=1 -v ./service/...
format:
go fmt ./...
lint: install-build-deps
go tool golangci-lint run
install-build-deps:
ifeq (, $(shell which copywrite))
go install github.com/hashicorp/copywrite@v0.22.0
endif
generate: install-build-deps
go tool mockery
go generate ./...
VERSION ?= "0.0.0"
release-local: install-build-deps
rm -rf dist
/bin/bash -c "go tool goreleaser --snapshot --skip=validate,announce,publish -f <(sed s/{{.Version}}/$(VERSION)/g < .goreleaser.yaml)"
.PHONY: docs
docs:
rm -rf docs
mkdir docs
go run -ldflags="-X 'github.com/codesphere-cloud/oms/internal/version.binName=oms-cli'" hack/gendocs/main.go
cp docs/oms-cli.md docs/README.md
generate-license: generate
go tool go-licenses report --template .NOTICE.template ./... > NOTICE
copywrite headers apply
run-lima:
limactl start ./hack/lima-oms.yaml
stop-lima:
limactl stop lima-oms
limactl delete lima-oms