forked from metafates/mangal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (30 loc) · 900 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
MAKEFLAGS += --silent
ldflags := -X 'github.com/belphemur/mangal/constant.BuiltAt=$(shell date -u)'
ldflags += -X 'github.com/belphemur/mangal/constant.BuiltBy=$(shell whoami)'
ldflags += -X 'github.com/belphemur/mangal/constant.Revision=$(shell git rev-parse --short HEAD)'
ldflags += -s
ldflags += -w
build_flags := -ldflags=${ldflags}
all: help
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " build Build the mangal binary"
@echo " install Install the mangal binary"
@echo " uninstall Uninstall the mangal binary"
@echo " test Run the tests"
@echo " gif Generate usage gifs"
@echo " help Show this help message"
@echo ""
install:
@go install "$(build_flags)"
build:
@go build "$(build_flags)"
test:
@go test ./...
uninstall:
@rm -f $(shell which mangal)
gif:
@vhs assets/tui.tape
@vhs assets/inline.tape