-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (67 loc) · 2.99 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
language: go
sudo: false
go:
- "1.10"
env:
global:
- VERSION=$(cat VERSION)
# Skip the install step. Don't `go get` dependencies. Only build with the code
# in vendor/
#install: true
# email me the results of the test runs.
notifications:
email: true
# get dependencies with this command
# go list -f "{{.ImportPath}} {{.Imports}}" ./...
before_install:
- cd
- go get -u -v github.com/spf13/viper
- go get -u -v github.com/spf13/cobra
- go get -u -v golang.org/x/crypto/bcrypt
- go get -u -v github.com/mattn/go-sqlite3
- go get -u -v github.com/mitchellh/go-homedir
- go get -u -v github.com/gin-gonic/gin
- go get -u -v github.com/olekukonko/tablewriter
# Anything in before_script that returns a nonzero exit code will flunk the
# build and immediately stop. It's sorta like having set -e enabled in bash.
# Make sure golangci-lint is vendored by running
# dep ensure -add github.com/golangci/golangci-lint/cmd/golangci-lint
# ...and adding this to your Gopkg.toml file.
# required = ["github.com/golangci/golangci-lint/cmd/golangci-lint"]
#
# before_script:
# - go install ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint
install:
- go get -u -v github.com/sirupsen/logrus
script:
- cd $HOME/gopath/src/github.com/swordlordcodingcrew/gohjasmin
- mkdir build
- GOPATH="$HOME/gopath/src/github.com/swordlordcodingcrew/gohjasmin:/home/travis/gopath"
- go build -o build/gohjasmind-v$VERSION -gcflags "all=-N -l" swordlord.com/gohjasmind
# - go build -o build/gohjasmincli-v$VERSION -gcflags "all=-N -l" swordlord.com/gohjasmincli
# - make
# go test -v swordlord.com/gohjasmind
# With this configuration the build itself runs for every commit and PR
# (which is nice, because we see if everything compiles fine), but the
# deployment only happens when we actually push a tag as well containing
# the version number of the new release.
#
# deploy:
# provider: releases
# skip_cleanup: true # Important, otherwise the build output would be purged.
# api_key:
# secure: lFGBaF...SJ1lDPDICY=
# file: bin/myawesomeapp
# on:
# repo: account/myawesomeproject
# tags: true # The deployment happens only if the commit has a tag.
deploy:
provider: releases
file:
- build/gohjasmind-v$VERSION
# - build/gohjasmincli-v$VERSION
api_key:
secure: f377fIrjzqzlLykPkTt0sGjVcbxDK3krH4hH/pzzdQO+qx44fmzfl0WkhuqyHhGnDZxsBd2P+kZK/n0tLFZ0LYAous2WJAzuKmQL3zUE+NAaeZZIMNRyM7Q4THBVYnPupIGsH6uI7OrnOc3RejV932ZbCNNQH/DSvgbvE7x0AhcDwZxC21CdfRR2Tmzhyo77dlwo23WiOPzO39uBYvsYJDhwNjMljB9hKeb/utkhZQX5cj6r3gvakNVO0VleAfEa5SwgabU6LOcAN6RKoCJgtBQHMOKU+6ayg1xZorC1MQ1QzaXWemu3CTKulMbk1JYPnzmvIzlm9DaShzIjTuxFzjxuNVPYUQytA6gVV5tMwkSutps3ONhpDlqiqXu5E5Z/BrPnvHGnPxKMTIaPzWEAr887UxgPlVgzAV0bUJV+ZI+yHSoapXAYFFuc7CYy0/ysADQXPpf09LmrGwJ78bItXjhhv2bmLAfZgrRLqcjbTtpYJW6IF3LhgZAWjuwX7ZIrL2V8QKVG2Kf4eUjFFjFG5R/55hJdN+DYBbjFFbR+XR+HUX639aBfbmgdGmDc2ii80CkAGDRV8pZpEsVf869JQlnNJQEx5BUZUhHvZapciCEV5834AWmC11EjTYvY7erwSHMFL9elgLA15QbiU3kBRY70mWhl+WwcDC+qiF8Tyb0=
skip_cleanup: true
on:
tags: true