-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (55 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Lint
lint:
go run github.com/golangci/golangci-lint/cmd/[email protected] run
.PHONY: lint
# Test
test:
go test ./... -short -race
.PHONY: test
uploader-test:
go test ./... -timeout 30s -run ^TestUploader$
.PHONY: uploader-test
checker-test:
go test ./... -timeout 5m -run ^TestChecker$
.PHONY: checker-test
mocks: clean-mocks
go run github.com/vektra/mockery/[email protected] --name=GCS --recursive --with-expecter
.PHONY: mocks
clean-mocks:
rm -rf mocks
.PHONY: clean-mocks
uploader-local:
FUNCTION_TARGET=Uploader go run cmd/main.go
.PHONY: uploader-local
uploader-deploy:
gcloud functions deploy go-finalize-function \
--gen2 \
--runtime=go120 \
--region=us-east1 \
--source=. \
--entry-point=Uploader \
--trigger-event-filters="type=google.cloud.storage.object.v1.metadataUpdated" \
--trigger-event-filters="bucket=tableland-basin-staging" \
--memory 32768MB \
--timeout 540s \
--env-vars-file uploader.env.yml
.PHONY: uploader-deploy
checker-local:
FUNCTION_TARGET=StatusChecker go run cmd/main.go
.PHONY: checker-local
checker-deploy:
gcloud functions deploy go-http-function \
--gen2 \
--region=us-east1 \
--runtime=go120 \
--source=. \
--entry-point=StatusChecker \
--trigger-http \
--memory 8192MB \
--timeout 600s \
--run-service-account [email protected] \
--env-vars-file checker.env.yml
.PHONY: checker-deploy
ethereum:
go run github.com/ethereum/go-ethereum/cmd/[email protected] --abi ./evm/basin_storage/out/BasinStorage.sol/BasinStorage.abi.json --bin ./evm/basin_storage/out/BasinStorage.sol/BasinStorage.bin --pkg ethereum --type Contract --out pkg/ethereum/contract.go
.PHONY: ethereum