-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile
41 lines (30 loc) · 944 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
export SHELL:=/usr/bin/env bash -O extglob -c
export GO111MODULE:=on
export OS=$(shell uname | tr '[:upper:]' '[:lower:]')
build: GOOS ?= ${OS}
build: GOARCH ?= amd64
build:
rm -f kt
GOOS=${GOOS} GOARCH=${GOARCH} go build -ldflags "-X main.buildTime=`date --iso-8601=s` -X main.buildVersion=`git rev-parse HEAD | cut -c-7`" .
release-linux: testing
GOOS=linux $(MAKE) build
tar Jcf kt-`git describe --abbrev=0 --tags`-linux-amd64.txz kt
release-darwin:
GOOS=darwin $(MAKE) build
tar Jcf kt-`git describe --abbrev=0 --tags`-darwin-amd64.txz kt
release: testing clean release-linux release-darwin
dep-up:
docker compose -f ./test-dependencies.yml up -d
dep-down:
docker compose -f ./test-dependencies.yml down
testing: dep-up test dep-down
test: clean
go test -v -vet=all -failfast -race
.PHONY: test-secrets
test-secrets:
cd test-secrets ; /usr/bin/env bash create-certs.sh
clean:
rm -f kt
rm -f kt-*.txz
run: build
./kt