-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 747 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 747 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
38
39
40
SHELL=/bin/bash -euo pipefail
# Mostly taken from https://github.com/mitchellh/packer which is licensed under the MPL2 license
NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
export GOOS=$(shell go env GOOS)
export GOARCH=$(shell go env GOARCH)
export GO111MODULE=on
.PHONY: update-deps
update-deps:
go get -u
$(MAKE) mod-tidy
.PHONY: mod-tidy
mod-tidy:
go mod tidy -compat=1.22
.PHONY: format
format:
@go fmt ./...
.PHONY: test-setup
test-setup:
@go clean -testcache
.PHONY: test
test:
ifdef CI
@echo "+++ [make test] $(OK_COLOR)Testing Go continuous profiler code$(NO_COLOR)"
endif
go test . -race -v | sed 's/--- /-+- /g'
.PHONY: bench
bench:
go test -bench . -benchmem
print-version:
@go run cmd/print_version.go
.PHONY: print-version