Add Makefile

master
Nick Krichevsky 2019-03-16 15:46:24 -04:00
parent 25adce2b0a
commit 4990fe87c2
1 changed files with 25 additions and 0 deletions

25
Makefile Normal file
View File

@ -0,0 +1,25 @@
ENV ?= dev
export GO111MODULE = on
.PHONY: all build clean_build
all: | build clean_build
build: web/static/css/dist/bootstrap
# Only build static assets into the binary in the dev environment
ifeq ($(ENV), dev)
packr2
endif
go build
clean_build:
rm -rf web/static/css/dist
packr2 clean
clean: clean_build
rm -f updown
web/static/css/dist:
mkdir -p web/static/css/dist
web/static/css/dist/bootstrap: node_modules/bootstrap web/static/css/dist
ln -s $(abspath node_modules/bootstrap/dist/css) web/static/css/dist/bootstrap