-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 897 Bytes
/
Makefile
File metadata and controls
46 lines (36 loc) · 897 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
41
42
43
44
45
46
export VERSION := $(shell git describe --tags --always --dirty)
export GO_BUILD_ASMFLAGS := all=-trimpath=$(PWD)
export GO_BUILD_GCFLAGS := all=-trimpath=$(PWD)
export GO_BUILD_LDFLAGS := -s -w
export GO_BUILD_TAGS :=
.PHONY: install
install:
CGO_ENABLED=0 go install .
.PHONY: build
build:
go build -o bin/kpm .
.PHONY: test
test:
go test ./...
.PHONY: demos
demos:
$(MAKE) -C demos
ifeq ($(origin IMAGE_REPO), undefined)
IMAGE_REPO := ghcr.io/joelanford/kpm
endif
export IMAGE_REPO
ifeq ($(origin IMAGE_TAG), undefined)
IMAGE_TAG := devel
endif
export IMAGE_TAG
ifeq ($(origin ENABLE_RELEASE_PIPELINE), undefined)
ENABLE_RELEASE_PIPELINE := false
endif
export ENABLE_RELEASE_PIPELINE
ifeq ($(origin GORELEASER_ARGS), undefined)
GORELEASER_ARGS := --snapshot --clean
endif
export GORELEASER_ARGS
.PHONY: release
release:
go tool goreleaser release $(GORELEASER) $(GORELEASER_ARGS)