forked from apache/openwhisk-wskdeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (34 loc) · 907 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
42
43
44
45
46
47
48
49
50
SOURCEDIR=.
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
BINARY=wskdeploy
VERSION=1.0.0
BUILD=`git rev-parse HEAD`
deps:
@echo "Installing dependencies"
go get -d -t ./...
LDFLAGS=-ldflags "-X main.Version=`date -u '+%Y-%m-%dT%H:%M:%S'` -X main.Build=`git rev-parse HEAD` "
updatedeps:
@echo "Updating all dependencies"
@go get -d -u -f -fix -t ./...
test: deps
@echo "Testing"
go test ./... -tags=unit
# Build the project
build: test
go build ${LDFLAGS} -o ${BINARY}
# Run the integration test against OpenWhisk
integration_test:
@echo "Launch the integration tests."
go test -v ./... -tags=integration
format:
@echo "Formatting"
go fmt ./...
lint: format
@echo "Linting"
golint .
install:
go install
# Cleans our project: deletes binaries
clean:
if [ -f ${BINARY} ] ; then rm ${BINARY}; fi
.PHONY: clean install build deps updatedeps format lint test integration_test