forked from CrunchyData/pg_featureserv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (34 loc) · 1.09 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
language: go
sudo: false
matrix:
include:
- go: tip
os: linux
env: CROSS_COMPILE=true
- go: tip
os: osx
env: CROSS_COMPILE=false
before_install:
- if [ "$CROSS_COMPILE" = "true" ]; then sudo apt update; fi
install:
- if [ "$CROSS_COMPILE" = "true" ]; then sudo apt install gcc-mingw-w64 libc6-dev-i386; fi
script:
- mkdir upload
- go build
- if [ "$TRAVIS_TAG" = "" ]; then REL=snapshot; else REL=$TRAVIS_TAG; fi
- zip -r upload/pg_featureserv_${REL}_${TRAVIS_OS_NAME}.zip pg_featureserv README.md LICENSE.md config.toml html/
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$CROSS_COMPILE" = "true" ]; then env CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build -v; zip -r upload/pg_featureserv_${REL}_windows.zip pg_featureserv.exe README.md LICENSE.md config.toml html/; fi
deploy:
on:
repo: CrunchyData/pg_featureserv
branch: master
provider: s3
region: us-east-1
bucket: postgisftw
local_dir: "./upload"
overwrite: true
verbose: true
edge: true
access_key_id: ${AWS_ACCESS_KEY_ID}
secret_access_key: ${AWS_SECRET_ACCESS_KEY}
cleanup: false