Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (51 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
67 lines (51 loc) · 1.63 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
60
61
62
63
64
65
66
67
all: build-cli
build-cli:
cd cli && go build -v && mv cli ../oms
build-cli-linux:
GOOS=linux GOARCH=amd64 go build -C cli -o ../oms
test:
# -count=1 to disable caching test results
go test -count=1 -v ./...
test-integration: build-cli
# Run integration tests with build tag
go test -count=1 -v -tags=integration ./cli/...
format:
go fmt ./...
lint: install-build-deps
go tool golangci-lint run -c .golangci-tmp.yml
lint-changed: install-build-deps
go tool golangci-lint run -c .golangci.yml --new-from-merge-base=origin/main
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'" hack/gendocs/main.go
cp docs/oms.md docs/README.md
cp hack/gendocs/static/*.md docs/
DOCS_OUTPUT ?= docs-docusaurus
DOCS_VERSION ?= development
.PHONY: docs-docusaurus
docs-docusaurus:
rm -rf "$(DOCS_OUTPUT)"
go run -ldflags="-X 'github.com/codesphere-cloud/oms/internal/version.binName=oms'" hack/gendocs/main.go --docusaurus --output "$(DOCS_OUTPUT)" --version "$(DOCS_VERSION)"
generate-license: generate
$(MAKE) generate-notice
copywrite headers apply
generate-notice:
go run ./hack/gennotice
run-lima:
limactl start ./hack/lima-oms.yaml
stop-lima:
limactl stop lima-oms
limactl delete lima-oms