forked from square/keywhiz-fs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 698 Bytes
/
Makefile
File metadata and controls
25 lines (19 loc) · 698 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
# Required for os/user to work on cross-compile
export CGO_ENABLED = 1
BUILD_TIME := $(shell date +%s)
BUILD_REVISION := $(shell git rev-parse --verify HEAD)
BUILD_MACHINE := $(shell uname -mnrs)
SOURCE_FILES := $(shell find . \( -name '*.go' -not -path './vendor/*' \))
# Build
keywhiz-fs: $(SOURCE_FILES)
go build -ldflags "-s -w \
-X \"main.buildTime=$(BUILD_TIME)\" \
-X \"main.buildRevision=$(BUILD_REVISION)\" \
-X \"main.buildMachine=$(BUILD_MACHINE)\""
# Run all tests
test:
go test -v -coverprofile coverage.out
integration-test: keywhiz-fs
go build -o integration-tests/fake-server ./integration-tests
cd integration-tests && go test -v .
.PHONY: test integration-test