From 35c0150522ea66d8f30e1f89176d34f92581ee42 Mon Sep 17 00:00:00 2001 From: Lukas Welte Date: Thu, 7 Feb 2019 16:05:02 +0100 Subject: [PATCH] Download release instead of building editor from source --- .gitignore | 2 ++ .travis.yml | 3 --- Makefile | 13 +++++++------ appveyor.yml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 17a0109d..5a236cd6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Folders _obj _test +editor # Architecture specific extensions/prefixes *.[568vq] @@ -25,6 +26,7 @@ _testmain.go # Bindata bindata_assetfs.go +bindata.go # Built binary maputnik diff --git a/.travis.yml b/.travis.yml index 07d98757..2b33de95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,6 @@ addons: paths: - maputnik install: -- nvm install 6 -- nvm use 6 - go get -u golang.org/x/sys/... - go get github.com/fsnotify/fsnotify - go get github.com/gorilla/handlers @@ -21,7 +19,6 @@ install: - go get github.com/jteeuwen/go-bindata/... - wget https://raw.githubusercontent.com/openmaptiles/klokantech-basic-gl-style/master/style.json script: -- mkdir -p editor/public - make - ./maputnik --help - ./maputnik --version diff --git a/Makefile b/Makefile index 582aeec8..2b3b94ce 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/appveyor.yml b/appveyor.yml index 97f6e736..2cc98eed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,6 @@ environment: # scripts that run after cloning repository install: -- git submodule update --init --recursive - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - go version - go env @@ -25,6 +24,7 @@ install: - go get github.com/urfave/cli - go get github.com/elazarl/go-bindata-assetfs/... - go get github.com/jteeuwen/go-bindata/... +- make # to run your custom scripts instead of automatic MSBuild build_script: