-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
32 lines (25 loc) · 888 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
.PHONY: build_linux_amd64 build dbuild dinit dup ddown duprefresh run
run:
go run ./cmd/Shareledgerd/main.go start
build_linux_amd64:
env GOOS=linux GOARCH=amd64 go build -o build/shareledger_linux_amd64 ./cmd/Shareledgerd
build:
go build -o build/shareledger ./cmd/Shareledgerd
dbuild:
docker build -t sharering/shareledger -f ./deploy/docker/Dockerfile .
dinit:
rm -rf ./deploy/testnet && \
cp -r ./deploy/testnet_config ./deploy/testnet && \
cp ./deploy/testnet/genesis.json ./deploy/testnet/node0/config && \
cp ./deploy/testnet/genesis.json ./deploy/testnet/node1/config && \
cp ./deploy/testnet/genesis.json ./deploy/testnet/node2/config && \
cp ./deploy/testnet/genesis.json ./deploy/testnet/node3/config
dup:
cd ./deploy && \
docker-compose up -d --remove-orphans
ddown:
cd ./deploy && \
docker-compose down
duprefresh: dinit dup
test:
go test ./... -v