forked from drand/drand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (24 loc) · 963 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
.PHONY: test test-unit test-integration demo deploy-local linter install build
test: test-unit test-integration
test-unit:
GO111MODULE=on go test -v ./...
test-integration:
cd demo && go build && ./demo -build -test
linter:
@echo "Checking (& upgrading) formatting of files. (if this fail, re-run until success)"
@{ \
files=$$( go fmt ./... ); \
if [ -n "$$files" ]; then \
echo "Files not properly formatted: $$files"; \
exit 1; \
fi; \
}
demo:
cd demo && go build && ./demo -build
#cd demo && sudo ./run.sh
# create the "drand" binary and install it in $GOBIN
install:
GO111MODULE=on go install -ldflags "-X main.version=`git describe --tags` -X main.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` -X main.gitCommit=`git rev-parse HEAD`"
# create the "drand" binary in the current folder
build:
go build -ldflags "-X main.version=`git describe --tags` -X main.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` -X main.gitCommit=`git rev-parse HEAD`"