forked from cloudspannerecosystem/spanner-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 851 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (19 loc) · 851 Bytes
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
build:
go build
cross-compile:
gox -os="linux" -arch="386 amd64 arm arm64" -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}"
gox -os="darwin" -arch="386 amd64" -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}"
gox -os="windows" -arch="386 amd64" -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}"
package:
goxc
release: clean cross-compile package
ghr -draft -token ${GITHUB_TOKEN} ${VERSION} dist/snapshot/
@echo "released as draft"
clean:
rm -f spanner-cli
rm -rf dist/
go clean -testcache
run:
./spanner-cli -p ${PROJECT} -i ${INSTANCE} -d ${DATABASE}
test:
@SPANNER_CLI_INTEGRATION_TEST_PROJECT_ID=${PROJECT} SPANNER_CLI_INTEGRATION_TEST_INSTANCE_ID=${INSTANCE} SPANNER_CLI_INTEGRATION_TEST_DATABASE_ID=${DATABASE} SPANNER_CLI_INTEGRATION_TEST_CREDENTIAL=${CREDENTIAL} GOOGLE_APPLICATION_CREDENTIALS=/dev/null go test -v ./...