-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 850 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
PACKAGE_NAME=db2jsonschema
CMD_PATH=cmd/db2jsonschema/main.go
BUILD_PATH=/go/src/github.com/tgallant/db2jsonschema
BUILD_FILE=Dockerfile
CI_BUILD_FILE=Dockerfile.ci
CI_IMAGE_TAG=db2j_ci
.PHONY: test
deps:
go get -v ./...
build:
go build -v -o ${PACKAGE_NAME} ${CMD_PATH}
build_image:
./scripts/build_image.sh ${BUILD_FILE} ${PACKAGE_NAME}
build_ci_image:
./scripts/build_image.sh ${CI_BUILD_FILE} ${CI_IMAGE_TAG}
run_ci_image:
docker run -v ${PWD}:${BUILD_PATH} ${CI_IMAGE_TAG}
ci: build_ci_image run_ci_image
test:
go test -v ./...
mysql:
./scripts/start_mysql.sh
lint: deps
./scripts/lint.sh
shellcheck:
./scripts/shellcheck.sh
test_all: test lint shellcheck
run_actions:
./scripts/actions.sh ${CI_IMAGE_TAG}
actions: build_ci_image run_actions
release:
./scripts/release.sh $(SEMVER)
clean:
go clean
rm ${BINARY_NAME}