mirror of
https://github.com/maputnik/editor.git
synced 2026-08-26 23:17:27 +00:00
Use go cross compile to build once with travis for all platforms
This commit is contained in:
+4
-1
@@ -7,7 +7,9 @@ go:
|
|||||||
addons:
|
addons:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- maputnik
|
- maputnik_linux
|
||||||
|
- maputnik_darwin
|
||||||
|
- maputnik_windows.exe
|
||||||
install:
|
install:
|
||||||
- go get -u golang.org/x/sys/...
|
- go get -u golang.org/x/sys/...
|
||||||
- go get github.com/fsnotify/fsnotify
|
- go get github.com/fsnotify/fsnotify
|
||||||
@@ -17,6 +19,7 @@ install:
|
|||||||
- go get github.com/urfave/cli
|
- go get github.com/urfave/cli
|
||||||
- go get github.com/elazarl/go-bindata-assetfs/...
|
- go get github.com/elazarl/go-bindata-assetfs/...
|
||||||
- go get github.com/jteeuwen/go-bindata/...
|
- go get github.com/jteeuwen/go-bindata/...
|
||||||
|
- go get github.com/mitchellh/gox
|
||||||
- wget https://raw.githubusercontent.com/openmaptiles/klokantech-basic-gl-style/master/style.json
|
- wget https://raw.githubusercontent.com/openmaptiles/klokantech-basic-gl-style/master/style.json
|
||||||
script:
|
script:
|
||||||
- make
|
- make
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ EDITOR_VERSION ?= v1.5.0
|
|||||||
all: $(BINARY)
|
all: $(BINARY)
|
||||||
|
|
||||||
$(BINARY): $(SOURCES) bindata_assetfs.go
|
$(BINARY): $(SOURCES) bindata_assetfs.go
|
||||||
go build -o ${BINARY}
|
gox -osarch "windows/amd64 linux/amd64 darwin/amd64" -output "${BINARY}_{{.OS}}"
|
||||||
|
|
||||||
editor/create_folder:
|
editor/create_folder:
|
||||||
mkdir -p editor
|
mkdir -p editor
|
||||||
@@ -19,4 +19,4 @@ bindata_assetfs.go: editor/pull_release
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf editor/public && rm -f bindata.go && rm -f bindata_assetfs.go && rm -f maputnik
|
rm -rf editor/public && rm -f bindata.go && rm -f bindata_assetfs.go && rm -f maputnik_*
|
||||||
|
|||||||
@@ -54,11 +54,10 @@ maputnik --watch --file basic-v9.json
|
|||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
Clone the repository **recursively** since the Maputnik editor is embedded
|
Clone the repository. Make sure you clone it into the correct directory `$GOPATH/src/github.com/maputnik`.
|
||||||
as submodule. Make sure you clone it into the correct directory `$GOPATH/src/github.com/maputnik`.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone --recursive git@github.com:maputnik/desktop.git
|
git clone git@github.com:maputnik/desktop.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Install the 3rd party dependencies.
|
Install the 3rd party dependencies.
|
||||||
@@ -72,6 +71,7 @@ go get github.com/fsnotify/fsnotify
|
|||||||
go get github.com/urfave/cli
|
go get github.com/urfave/cli
|
||||||
go get github.com/elazarl/go-bindata-assetfs/...
|
go get github.com/elazarl/go-bindata-assetfs/...
|
||||||
go get github.com/jteeuwen/go-bindata/...
|
go get github.com/jteeuwen/go-bindata/...
|
||||||
|
go get github.com/mitchellh/gox
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `make` to build the app distribution bundle and create the `maputnik` binary
|
Run `make` to build the app distribution bundle and create the `maputnik` binary
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
# version format
|
|
||||||
version: "{build}"
|
|
||||||
|
|
||||||
# Operating system (build VM template)
|
|
||||||
os: Windows Server 2012 R2
|
|
||||||
|
|
||||||
clone_folder: c:\gopath\src\github.com\maputnik\desktop
|
|
||||||
|
|
||||||
# environment variables
|
|
||||||
environment:
|
|
||||||
GOPATH: c:\gopath
|
|
||||||
GO15VENDOREXPERIMENT: 1
|
|
||||||
|
|
||||||
# scripts that run after cloning repository
|
|
||||||
install:
|
|
||||||
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
|
|
||||||
- go version
|
|
||||||
- go env
|
|
||||||
- go get -u golang.org/x/sys/...
|
|
||||||
- go get github.com/fsnotify/fsnotify
|
|
||||||
- go get github.com/gorilla/handlers
|
|
||||||
- go get github.com/gorilla/mux
|
|
||||||
- go get github.com/gorilla/websocket
|
|
||||||
- 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:
|
|
||||||
- go vet ./...
|
|
||||||
- gofmt -s -l .
|
|
||||||
- C:\MinGW\bin\mingw32-make.exe
|
|
||||||
|
|
||||||
artifacts:
|
|
||||||
- path: maputnik
|
|
||||||
|
|
||||||
# to disable automatic tests
|
|
||||||
test: off
|
|
||||||
|
|
||||||
# to disable deployment
|
|
||||||
deploy: off
|
|
||||||
Reference in New Issue
Block a user