-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
59 lines (51 loc) · 3.54 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
sudo: required
services:
- docker
language: go
go:
- 1.8
- 1.9
env:
matrix:
- OKARCH=amd64 OSARCH=amd64
- OKARCH=386 OSARCH=i386
global:
- VERSION=${TRAVIS_TAG}
- GH_USER=${TRAVIS_REPO_SLUG%/*}
- GH_APP=${TRAVIS_REPO_SLUG#*/}
- JFROG_CLI_OFFER_CONFIG=false
# GH TOKEN
- secure: fbxLs9ALbBZEwJn4HPlOn9P4RO2bX1rXDc2y6TSp+r6wARLU+HBj2xwK6aW7GQpbi94ZK2F7Lgsb1TQYMcvA8pRmKCRIfGfd/AlVE7jgAz+YVxhg1diE9JycjUbBC3XyIVmRaXX7M/6va/Pe0DesgCaf3sclBzenxF28aSzFoAnaS3/t0PItyKtfiGbaJV6ODzm4LgWhf8GdUALFrWyRC3bR1TWrJGgX2EIJ0OkPDaOfoMJXtb6COjJ2N2KRfyFIaO4TkcCrFAlK14MavfS9ibR9MYtyM/gVtqPGUuTu3mMprkU0AgqwzfUp/waOLW6110/cFiKtWLvCuYe7nXyjy39mzDfr6iA4SeNg55equyhlz88s6mqHAeJ+XEcXX150fwOJbyDh7Fs2Ovfmi4Awc9XW87HkwoyKJYkwdfmAxEUkBZVS+doIuPn3wt49OkCtHGGTmkZZsp0q4gpq0wWwpegH+1XLfesMFWCflN7jTRm9SlSu/TES+pP1caVDxP0arXPoPrBjVwcL6M9o4tA8WD5cKgRQ/PJ8rk8fjD0b5hyDTKki/lViuu96KDYFE7BKu4fH8P8ZJ2nUBJX50IU625dJiaU3QzuVXocqo92jxMwWFkBf3Rz8ms6gFoYA6BHvMlyNKlG/YJ7FZfEfGpX4LN4qc+rny/bK5Fxo1BMvrh4=
# BINTRAY TOKEN
- secure: j01Vs74XTn2EQ17K4CdRWY/FJVgDdFFd+QEbZo4T03cFzydbzivNAsQtkZyKO9K6Nq3ElVaTSP9a4gq6HMT+x6Rp6zVssWOXFv6gRRzPq3sBYQhx4GetMQtcKOhLjOTIg06TpJjkXjuGOJw00GUBcBfA+OIFkAHyX+4KQ2fM6fo8m69ZShN8LaiLK1PZjAu1j/0cYopxCoI88V8nbBPPYBdsq3porPyhhEbZgERVzs0hveDzhtRyoNKQhRViGMKw6MzMLqXek3ixVlusmpDLrLce/38bKXoXXLUpiMd8dSTYlh89yFCTp0us4iEM23b47yGySP8Tt0grD1PKUEf5y+6Pm/4VQuG/IcNMqkQzP08jJVK8Ai6iu27mHGRR/LOGcGf57ZRPJuQHJD01DjVJ/WctPeZg5SX/YasHf08kMeooCoNZb3E4Q9PRxI/bvjvv8wtVSb4roT9c3LQ5rmEM6PZFh+SBQOIsyAT5xBFVPrWA0QEbVkaLMYElsf/fuu8LMWpV9SqrPAgnDY58c8RgfJQ9Iq7V02vXoxC9qNiXBETmAy8cvnBkoN/D7cue4Fa++YGVCbDDDN6eysYVwIZWW2bjSvpekqTJU/i8RbVuNWP++e43dJDrwfhYZAA3MyO6nRz40cczVabL0AjSUREDKII0ZwMpsiIHkhOkGFcRUcc=
before_install:
- sudo add-apt-repository 'deb https://dl.bintray.com/mh-cbon/deb unstable main'
- sudo apt-get -qq update
- sudo apt-get install --allow-unauthenticated changelog fakeroot
- mkdir -p ${GOPATH}/bin
- cd ~
- curl https://glide.sh/get | sh
install:
- cd $GOPATH/src/github.com/$TRAVIS_REPO_SLUG
- glide install
- go install
script:
- echo "pass"
before_deploy:
- mkdir -p build/$OSARCH
- GOOS=linux GOARCH=$OKARCH go build --ldflags "-X main.VERSION=$VERSION" -o build/$OSARCH/$GH_APP main.go
- go-bin-deb generate --file deb.json -a $OSARCH --version $VERSION -o $GH_APP-$OSARCH-$VERSION.deb
- cp $GH_APP-$OSARCH-$VERSION.deb $GH_APP-$OKARCH.deb
- curl -fL https://getcli.jfrog.io | sh
- ./jfrog bt pc --key=$BTKEY --user=$GH_USER --licenses=MIT --vcs-url=https://github.com/$GH_USER/deb $GH_USER/deb/$GH_APP || echo "package already exists"
- ./jfrog bt upload --override=true --key $BTKEY --publish=true --deb=unstable/main/$OSARCH $GH_APP-$OSARCH-$VERSION.deb $GH_USER/deb/$GH_APP/$VERSION pool/g/$GH_APP/
deploy:
provider: releases
api_key:
secure: H64/VU6sWHdR4q6jo1C6vVuENALn6vWLi36MRKdhnLfcHBHDnSPCEcf3L5kUYHpAksMTKigofWYAEjyEVhzCm7CI1YHR3F4JRH6MUw/0jqoE5Nm5Ms6v8siIRdhWA+2e+Fg6CTDBfEV5FHLHEVTW3wSCyMz4g4U03aUfP5bz9g2SqLp3mwR0iPQmBkLzgDp8ju5tG25aTNSJC2eU/RGSC4CF7ZW7Z1/DB0p9ufbNxWiEpR7HwrwXCwS9lys9V/D+rWecu9BUinqfUgaYAsUHEKwns5FwYsTymFBRwYGif846/WPFOI/sDQFoyhHH9K23mHVYm3c5aRvKUqRMNbV2sRudCvI9Fl4FUlPO06jw7rhzM8ubHYn039pqE2wvPYYvKVmWudWayrdvlcKyz4eI3o4X1Cth0Owb+rXMXTsiSjOpIAiiLGjCrzfD/wfTJwANn/6Y22l6vqXfxQQjt43Q1wD7m50wDss2wXL8SdfeLBCioA3AHq3zMMUAsXA0rpC5q7Wl0wo5BaWatBO/VCmHIIIaZWA0tcQOJppwfSeq2GhgU+GIklJUifZwbuwd/OWzcbHJxSqc3quqMGzGTrklBHRHYWjkmRlFU1SycxizuhtEika6oO2H/WXPHfpLYBRCQtQEznPdviTpHQs3rL8YoHATUD2tKcOEWEoilL/fLo0=
file_glob: true
file:
- $GH_APP-$OKARCH.deb
on:
tags: true
skip_cleanup: true