-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 831 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 831 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
APP_NAME = scality-cosi-driver
BIN_DIR = ./bin
# 'go env' vars aren't always available in make environments, so get defaults for needed ones
GOARCH ?= $(shell go env GOARCH)
IMAGE_NAME ?= ghcr.io/scality/cosi-driver:latest
.PHONY: all build test clean
all: test build
build:
@echo "Building $(APP_NAME)..."
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -o $(BIN_DIR)/$(APP_NAME) ./cmd/$(APP_NAME)
test:
@echo "Running Ginkgo tests..."
# Running Ginkgo tests recursively (-r) with verbose output (-v)
ginkgo -r -v --cover --coverprofile=coverage.txt
clean:
@echo "Cleaning up..."
rm -rf $(BIN_DIR)
container:
@echo "Building container image..."
docker build -t $(IMAGE_NAME) .
delve:
@echo "Building Delve container image..."
docker build -f docker/delve/Dockerfile -t $(IMAGE_NAME)-delve .