updown/Makefile

26 lines
537 B
Makefile

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