-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathMakefile
24 lines (19 loc) · 1.03 KB
/
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
.PHONY: all build
TAG=$(shell git describe --abbrev=0 --tags 2>&1)
TS=$(shell date '+%b %d %Y %T')
all: help
# Self documenting makefile. Double hashes signify help comments.
help: ## Show this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
install: ## Installs tables-to-go. Requires `git` to be installed.
@go install -mod=vendor -ldflags \
"-X 'main.buildTimestamp=$(TS)' -X 'main.versionTag=$(TAG)'" \
.
sqlite3: ## Installs tables-to-go with sqlite3 driver and the \
## User Authentication feature enabled. \
## For more information see the documentation of the driver at \
## - https://github.com/mattn/go-sqlite3#compilation \
## - https://github.com/mattn/go-sqlite3#user-authentication
CGO_ENABLED=1 go install -mod=vendor -tags="sqlite3 sqlite_userauth" -ldflags \
"-X 'main.buildTimestamp=$(TS)' -X 'main.versionTag=$(TAG)'" \
.