forked from chef/automate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 1.05 KB
/
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
PACKAGE_PATH = github.com/chef/automate/components/data-lifecycle-service
BINS = ${PACKAGE_PATH}/cmd/data-lifecycle-service ${PACKAGE_PATH}/dls-e2eintegration
GIT_SHA = $(shell git rev-parse HEAD)
BUILD_TIME ?= $(shell date -u '+%Y%m%d%H%M%S')
VERSION = ${BUILD_TIME}
GO_LDFLAGS = --ldflags "-X ${LIBRARY_PATH}/version.Version=${BUILD_TIME} -X ${LIBRARY_PATH}/version.GitSHA=${GIT_SHA} -X ${LIBRARY_PATH}/version.BuildTime=${BUILD_TIME}"
GOPATH = $(shell go env GOPATH)
build: ${BINS}
include ../../Makefile.common_go
echo-build-data:
@echo "git_sha: ${GIT_SHA}"
@echo "version: ${VERSION}"
${BINS}: ${SERVICE_DATA_FILE} echo-build-data
@echo "GO $@"
@cd bin; go build ${GO_LDFLAGS} $@
serve:
@go run ${GO_LDFLAGS} cmd/data-lifecycle-service/data-lifecycle-service.go serve ./config.dev.toml
.PHONY: serve
unit:
@go test --count 1 -v $(shell go list ./... | grep -v '/vendor/' | grep -v 'integration') -cover
.PHONY: unit
test-ingest-purge:
@go test -tags=cfgmgmt -v ./test/purge_ingest_integration_test.go
.PHONY: test-cfgmgmt
clean:
@rm -rf bin/*
.PHONY: clean