aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..09d680a
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,30 @@
+# Makefile for Cobinhood Backend
+
+DEXON_CONSENSUS_CORE=github.com/dexon-foundation/dexon-consensus-core
+
+.PHONY: clean default
+
+default: all
+
+all: dexcon-simulation
+
+pre-submit: lint
+
+dexcon-simulation:
+ go install $(DEXON_CONSENSUS_CORE)/cmd/dexcon-simulation
+
+pre-submit: lint test vet
+
+lint:
+ @$(GOPATH)/bin/golint -set_exit_status `go list ./... | grep -v 'vendor'`
+
+vet:
+ @go vet `go list ./... | grep -v 'vendor'`
+
+test:
+ @for pkg in `go list ./... | grep -v 'vendor'`; do \
+ if ! go test $$pkg; then \
+ echo 'Some test failed, abort'; \
+ exit 1; \
+ fi; \
+ done