Download release instead of building editor from source

This commit is contained in:
Lukas Welte
2019-02-07 16:05:02 +01:00
parent c55278e7da
commit 35c0150522
4 changed files with 10 additions and 10 deletions
+7 -6
View File
@@ -1,21 +1,22 @@
SOURCEDIR=.
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
BINARY=maputnik
EDITOR_VERSION ?= v1.5.0
all: $(BINARY)
$(BINARY): $(SOURCES) bindata_assetfs.go
go build -o ${BINARY}
editor/node_modules:
cd editor && npm install
editor/create_folder:
mkdir -p editor
editor/public: editor/node_modules
cd editor && npm run build
editor/pull_release: editor/create_folder
cd editor && rm -rf public && curl -L https://github.com/maputnik/editor/releases/download/$(EDITOR_VERSION)/public.zip --output public.zip && unzip public.zip && rm public.zip
bindata_assetfs.go: editor/public
bindata_assetfs.go: editor/pull_release
go-bindata-assetfs --prefix "editor/" editor/public/...
.PHONY: clean
clean:
rm -rf editor/public && rm -f bindata_assetfs.go && rm -f maputnik
rm -rf editor/public && rm -f bindata.go && rm -f bindata_assetfs.go && rm -f maputnik