-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 1.07 KB
/
Makefile
File metadata and controls
24 lines (18 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
GO_VERSION := $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1,2)
###############################################################################
### Build ###
###############################################################################
build: ensure_version
CGO_ENABLED=1 go build -mod=readonly -ldflags="-linkmode=external" -o ./build/ksync ./cmd/ksync/main.go
###############################################################################
### Tests ###
###############################################################################
test:
docker build --platform linux/amd64 --no-cache -t ksync:test .
###############################################################################
### Checks ###
###############################################################################
ensure_version:
ifneq ($(GO_VERSION),1.22)
$(error ❌ Please run Go v1.22.x..)
endif