forked from algorand/conduit-cockroachdb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (39 loc) · 1.66 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
LDFLAGS += -X github.com/algorand/conduit/version.Hash=$(shell git log -n 1 --pretty="%H")
LDFLAGS += -X github.com/algorand/conduit/version.ShortHash=$(shell git log -n 1 --pretty="%h")
LDFLAGS += -X github.com/algorand/conduit/version.CompileTime=$(shell date -u +%Y-%m-%dT%H:%M:%S%z)
LDFLAGS += -X "github.com/algorand/conduit/version.ReleaseVersion=Custom Plugin Build"
conduit:
cd cmd/conduit && CGO_ENABLED=0 go build -ldflags='${LDFLAGS}'
./cmd/conduit/conduit -v
test:
go test ./...
fmt:
go fmt ./...
run: conduit
./build/node.sh
clean: docker-stop
rm -rf run_data
release:
@echo "\nConfiguring .goreleaser"
build/sync-config.sh
@echo "Build everything with:"
@echo " goreleaser release --skip-publish --snapshot --clean"
docker-node: docker-stop
docker run -d -p 4190:8080 --name conduit-template-follower \
-e ADMIN_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
-e TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
-e PROFILE=conduit \
-e NETWORK=testnet \
algorand/algod:stable
docker-status:
curl -qs -H "Authorization: Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "localhost:4190/v2/status?pretty"
docker-stop:
docker stop conduit-template-follower > /dev/null 2>&1 || true
docker rm conduit-template-follower > /dev/null 2>&1 || true
demo:
cd cmd/conduit && env GOOS=linux GOARCH=arm go build
docker-compose up -d --build cockroach1
docker exec -it cockroach1 ./cockroach sql --execute="CREATE DATABASE indexer;" --insecure
docker-compose up --build
indexerapi:
cd indexer && ./algorand-indexer daemon -P "host=localhost port=26257 user=root dbname=indexer"