-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
22 lines (16 loc) · 720 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
BUILD_IMAGE = darxkies/k8s-tew-build
VERSION = $(shell git describe --tags)
PACKAGE = github.com/darxkies/k8s-tew
compile:
docker buildx build --ulimit memlock=-1:-1 -t $(BUILD_IMAGE) .
docker run --rm --ulimit memlock=-1:-1 -v $$(pwd):/go/src/$(PACKAGE) $(BUILD_IMAGE)
build-binaries:
CGO_ENABLED=0 go build -ldflags "-X ${PACKAGE}/pkg/version.Version=${VERSION} -s -w" -o k8s-tew ${PACKAGE}/cmd/k8s-tew
watch-and-compile:
go get github.com/cespare/reflex
reflex -r '\.(go|yaml)$$' -R '^vendor' -R '^setup' -R '^pkg/utils/a_utils-packr\.go$$' make build-binaries
watch-and-update-documentation:
(cd docs && reflex -r '\.rst' -R "^_build" make clean html)
clean:
sudo rm -Rf bin vendor
.PHONY: build clean