-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 970 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 970 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
26
27
28
29
30
31
32
33
34
SHORT_NAME ?= workflow-cli
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
include versioning.mk
VERSION ?= canary
REPO_PATH := github.com/drycc/workflow-cli
DEV_ENV_IMAGE := ${DEV_REGISTRY}/drycc/go-dev
DEV_ENV_WORK_DIR := /opt/drycc/go/src/${REPO_PATH}
DIST_DIR ?= _dist
DEV_ENV_CMD := podman run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} -e CODECOV_TOKEN=${CODECOV_TOKEN} ${DEV_ENV_IMAGE}
bootstrap:
${DEV_ENV_CMD} go mod vendor
# This is supposed to be run within a container
build-binary:
${DEV_ENV_CMD} scripts/update-translations.sh -g
${DEV_ENV_CMD} scripts/build ${VERSION}
podman-build:
podman build . --build-arg VERSION=${VERSION} --build-arg CODENAME=${CODENAME} -f docker/Dockerfile -t ${IMAGE}
podman tag ${IMAGE} ${MUTABLE_IMAGE}
test-style:
${DEV_ENV_CMD} lint
test-cover:
${DEV_ENV_CMD} test-cover.sh
test: build-binary test-style test-cover
${DEV_ENV_CMD} go test -race -cover -coverprofile=coverage.txt -covermode=atomic ./...