/
circle.yml
26 lines (24 loc) · 1.04 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
dependencies:
override:
# no need to install dependencies, they are vendored
#
# but because Circle makes no sense, we have to setup our own Go workspace...
#
# first, create the workspace directory for our github org
- mkdir -p $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME
# next, link the source code into the workspace
- ln -fs $HOME/$CIRCLE_PROJECT_REPONAME $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
# now, add this workspace to $GOPATH
- echo 'export GOPATH=$HOME/.go_workspace:$GOPATH' >> ~/.circlerc
test:
override:
# now we can CD into the project and run our test script
- cd $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME && ./test.sh
deployment:
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: ride
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- cd $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME && ./release.sh