forked from lrstanley/vault-unseal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (34 loc) · 766 Bytes
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.DEFAULT_GOAL := build
export PROJECT := "vault-unseal"
license:
curl -sL https://liam.sh/-/gh/g/license-header.sh | bash -s
go-fetch:
go mod download
go mod tidy
upgrade-deps:
go get -u ./...
go mod tidy
upgrade-deps-patch:
go get -u=patch ./...
go mod tidy
clean:
/bin/rm -rfv "dist/" "${PROJECT}"
go-dlv: go-prepare
dlv debug \
--headless --listen=:2345 \
--api-version=2 --log \
--allow-non-terminal-interactive \
${PACKAGE} -- --debug
go-debug: clean
go run *.go --debug
go-prepare: go-fetch clean
go generate -x ./...
build: go-prepare go-fetch
CGO_ENABLED=0 \
go build \
-ldflags '-d -s -w -extldflags=-static' \
-tags=netgo,osusergo,static_build \
-installsuffix netgo \
-buildvcs=false \
-trimpath \
-o ${PROJECT}