-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 763 Bytes
/
Makefile
File metadata and controls
27 lines (22 loc) · 763 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
.PHONY: build test install release
build:
zig build -Doptimize=ReleaseFast
test:
zig build test --summary all
install: build
install -Dm644 "./zig-out/lib/libvoidbox.a" "$(HOME)/.local/lib/libvoidbox.a"
# ==================================================================================================
# Release
# ==================================================================================================
TYPE ?= patch
HAS_REL := $(shell command -v git-rel 2>/dev/null)
release:
@if [ -z "$(HAS_REL)" ]; then \
echo "git-rel is not installed. Please install it first."; \
exit 1; \
fi
@if [ -z "$(TYPE)" ]; then \
echo "Release type not specified. Use 'make release TYPE=[patch|minor|major|m.m.p]'"; \
exit 1; \
fi
@git rel $(TYPE)