forked from heroku/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
68 lines (68 loc) · 2.58 KB
/
circle.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
---
machine:
environment:
CACHE_DIR: ~/deps
WORKSPACE: ~/workspace/heroku
NPM_REGISTRY: https://cli-npm.heroku.com
JOBZ: 6
post:
- sudo rm -rf /usr/local/go
- if [ ! -e ~/deps/go1.6.2.linux-amd64.tar.gz ]; then mkdir -p ~/deps && wget -O ~/deps/go1.6.2.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz; fi
- sudo tar -C /usr/local -xzf ~/deps/go1.6.2.linux-amd64.tar.gz
checkout:
post:
- |
rm -rf ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME &&
mkdir -p ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME &&
cp -R ~/$CIRCLE_PROJECT_REPONAME ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/ &&
rm -rf ~/$CIRCLE_PROJECT_REPONAME &&
ln -s ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME ~/$CIRCLE_PROJECT_REPONAME &&
mkdir -p $CIRCLE_TEST_REPORTS/go
dependencies:
cache_directories:
- ~/deps
- ~/osslsigncode
- ~/workspace
- ~/.cache/heroku/npm
override:
- >
go version &&
if ! type gometalinter >/dev/null 2>&1; then go get -v github.com/alecthomas/gometalinter && gometalinter --install; fi &&
if ! type goveralls >/dev/null 2>&1; then go get -v github.com/mattn/goveralls; fi &&
if [ ! -d ~/osslsigncode ]; then
wget https://cli-assets.heroku.com/osslsigncode-1.7.1.tar.gz &&
tar -xvzf osslsigncode-1.7.1.tar.gz &&
mv osslsigncode-1.7.1 ~/osslsigncode &&
cd ~/osslsigncode && ./configure && make
fi &&
cd ~/osslsigncode && sudo make install
- make deps build -j $JOBZ
- sudo apt-get install cowsay nsis
test:
override:
- ./bin/test -v -race -cover -coverprofile=coverage.out -ginkgo.v
- make test -j $JOBZ
- ./bin/lint
post:
- |
go tool cover -html=coverage.out -o $CIRCLE_ARTIFACTS/coverage.html;
goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN;
deployment:
dev:
branch: dev
owner: heroku
commands:
- gpg --passphrase $HEROKU_WINDOWS_SIGNING_PASS -d resources/deb/key.gpg | gpg --import
- CHANNEL=dev make release -j $JOBZ
beta:
branch: master
owner: heroku
commands:
- gpg --passphrase $HEROKU_WINDOWS_SIGNING_PASS -d resources/deb/key.gpg | gpg --import
- CHANNEL=beta make release -j $JOBZ
stable:
tag: /v[0-9]+(\.[0-9]+)*/
owner: heroku
commands:
- gpg --passphrase $HEROKU_WINDOWS_SIGNING_PASS -d resources/deb/key.gpg | gpg --import
- CHANNEL=stable make release -j $JOBZ