forked from turnerlabs/harbor-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
42 lines (34 loc) · 1.35 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
# repo = /home/ubuntu/harbor-compose
# $GOPATH = /home/ubuntu/.go_workspace:/usr/local/go_workspace
machine:
environment:
IMPORT_PATH: "/usr/local/go_workspace/src/github.com/turnerlabs/harbor-compose"
dependencies:
pre:
- go get github.com/tools/godep
# copy the code to the canonical $GOPATH directory
override:
- sudo mkdir -p $IMPORT_PATH
- sudo rsync -az --delete ./ $IMPORT_PATH
test:
pre:
- cd $IMPORT_PATH && go vet -x $(go list ./... | grep -v /vendor/)
override:
- cd $IMPORT_PATH && godep go test -v $(go list ./... | grep -v /vendor/)
deployment:
release:
branch: master
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- go get github.com/inconshreveable/mousetrap
- 'cd $IMPORT_PATH && chmod +x ./build.sh && ./build.sh'
- 'cd $IMPORT_PATH && ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/'
prerelease:
branch: develop
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- go get github.com/inconshreveable/mousetrap
- 'cd $IMPORT_PATH && chmod +x ./build.sh && ./build.sh'
- 'cd $IMPORT_PATH && ghr --prerelease -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/'