-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 625 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
PWD:=$(shell pwd)
VERSION=0.0.0
MONOVA:=$(shell which monova dot 2> /dev/null)
version:
ifdef MONOVA
override VERSION=$(shell monova)
else
$(info "Install monova (https://github.com/jsnjack/monova) to calculate version")
endif
bin/template-renderer: version main.go cmd/*.go
CGO_ENABLED=0 go build -ldflags="-X github.com/surfly/template-renderer/cmd.Version=${VERSION}" -o bin/template-renderer
test:
cd cmd && go test
build: test bin/template-renderer
release: build
grm release surfly/template-renderer -f bin/template-renderer -t "v`monova`"
.ONESHELL:
clean:
rm -rf bin/*
.PHONY: version release build test