mirror of https://github.com/status-im/fathom.git
move gulp into build task to ensure latest assets are packrd
This commit is contained in:
parent
bbfb5d0b5f
commit
f1a85e7d01
14
Makefile
14
Makefile
|
@ -3,26 +3,24 @@ EXECUTABLE := fathom
|
|||
LDFLAGS += -extldflags "-static"
|
||||
MAIN_PKG := ./cmd/fathom
|
||||
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
|
||||
JS_SOURCES ?= $(shell find assets/. -name "*.js" -type f)
|
||||
SOURCES ?= $(shell find . -name "*.go" -type f)
|
||||
ENV ?= $(shell export $(cat .env | xargs))
|
||||
|
||||
.PHONY: all
|
||||
all: assets build
|
||||
all: build
|
||||
|
||||
.PHONY: install
|
||||
install: $(wildcard *.go)
|
||||
packr install $(MAIN_PKG)
|
||||
packr install -v -ldflags '-w $(LDFLAGS)' $(MAIN_PKG)
|
||||
|
||||
.PHONY: build
|
||||
build: $(EXECUTABLE)
|
||||
|
||||
$(EXECUTABLE): $(SOURCES)
|
||||
packr build -v -ldflags '-w $(LDFLAGS)' -o $@ $(MAIN_PKG)
|
||||
|
||||
.PHONY: assets
|
||||
assets:
|
||||
$(EXECUTABLE): $(SOURCES) $(JS_SOURCES)
|
||||
if [ ! -d "node_modules" ]; then npm install; fi
|
||||
gulp
|
||||
gulp
|
||||
packr build -v -ldflags '-w $(LDFLAGS)' -o $@ $(MAIN_PKG)
|
||||
|
||||
.PHONY: docker
|
||||
docker:
|
||||
|
|
Loading…
Reference in New Issue