-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
72 lines (58 loc) · 1.82 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
SCRIPTS_PATH := scripts
TEST_SCRIPTS_PATH := test/scripts
PROJECT_FLOGO_CLI_VERSION := v0.9.1-rc.2
PROJECT_FLOGO_CORE_VERSION := v0.9.3
PROJECT_FLOGO_FLOW_VERSION := v0.9.3
.PHONY: all
all: default build
default: fmt vet
# Capture output and force failure when there is non-empty output
fmt:
@echo gofmt -l .
@OUTPUT=`gofmt -l . 2>&1`; \
if [ "$$OUTPUT" ]; then \
echo "gofmt must be run on the following files:"; \
echo "$$OUTPUT"; \
exit 1; \
fi
vet:
go vet .
lint:
@echo golint ./...
@OUTPUT=`command -v golint >/dev/null 2>&1 && golint ./... 2>&1`; \
if [ "$$OUTPUT" ]; then \
echo "golint errors:"; \
echo "$$OUTPUT"; \
exit 1; \
fi
.PHONY: depend
depend:
$(SCRIPTS_PATH)/dependencies.sh -f
.PHONY: depend-noforce
depend-noforce:
@$(SCRIPTS_PATH)/dependencies.sh
.PHONY: install
install:
go install github.com/TIBCOSoftware/dovetail-cli/cmd/dovetail
chmod -R 755 ${GOPATH}/pkg/mod/github.com/project-flogo
cp flogo-patch/cli/util/contrib.go ${GOPATH}/pkg/mod/github.com/project-flogo/cli@$(PROJECT_FLOGO_CLI_VERSION)/util/
cp flogo-patch/core/support/ref.go ${GOPATH}/pkg/mod/github.com/project-flogo/core@$(PROJECT_FLOGO_CORE_VERSION)/support/
cp flogo-patch/flow/instance/util2.go ${GOPATH}/pkg/mod/github.com/project-flogo/flow@$(PROJECT_FLOGO_FLOW_VERSION)/instance/
go install github.com/TIBCOSoftware/dovetail-cli/cmd/dovetail
.PHONY: build
build:
go build -o dovetail github.com/TIBCOSoftware/dovetail-cli
.PHONY: buildtype
buildtype: install
@$(SCRIPTS_PATH)/buildtype.sh
.PHONY: test_all
test_all: dovetail-tests hyperledger-fabric-tests corda-tests
.PHONY: dovetail-tests
dovetail-tests:
@$(TEST_SCRIPTS_PATH)/dovetail.sh
.PHONY: hyperledger-fabric-tests
hyperledger-fabric-tests:
@$(TEST_SCRIPTS_PATH)/hyperledger-fabric.sh
.PHONY: corda-tests
corda-tests:
@$(TEST_SCRIPTS_PATH)/corda.sh