forked from cloudspannerecosystem/wrench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (20 loc) · 628 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
BINDIR ?= bin
export SPANNER_EMULATOR_HOST := localhost:9010
SPANNER_EMULATOR_HOST_REST := localhost:9020
export SPANNER_PROJECT_ID ?= wrench-test-project
export SPANNER_INSTANCE_ID ?= wrench-test-instance
REGISTRY := mercari/wrench
.PHONY: test
test:
go test -race -v ./...
.PHONY: dep
dep:
go mod tidy
.PHONY: build
build:
@mkdir -p $(BINDIR)
go build -o $(BINDIR)/wrench .
setup-emulator:
curl -s "${SPANNER_EMULATOR_HOST_REST}/v1/projects/${SPANNER_PROJECT_ID}/instances" --data '{"instanceId": "'${SPANNER_INSTANCE_ID}'"}'
docker-build:
docker build . -t $(REGISTRY):$(VERSION) --build-arg VERSION=$(VERSION)