-
Notifications
You must be signed in to change notification settings - Fork 1
/
wercker.yml
52 lines (44 loc) · 1.34 KB
/
wercker.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
box: aaharu/go-build:latest
build:
steps:
- wercker/setup-go-workspace
- wercker/golint
- script:
name: initialize git submodules
code: |
git submodule update --init --recursive
# Gets the dependencies
- script:
name: dep ensure
code: |
dep ensure
# Build the project
- script:
name: go build
code: |
go build ./...
# Test the project
- script:
name: go test and goveralls
code: |
go test -v -covermode=count -coverprofile="c.out" ./...
GIT_BRANCH="${WERCKER_GIT_BRANCH}" goveralls -v -coverprofile=c.out -service=wercker.com -repotoken "${COVERALLS_TOKEN}"
# corros compile
- tcnksm/gox:
os: "darwin linux windows freebsd netbsd"
arch: "amd64"
output: "{{.Dir}}_{{.OS}}_{{.Arch}}"
- script:
name: output release tag
code: |
grep -F 'const Version' "${WERCKER_SOURCE_DIR}/version/version.go" | cut -f4 -d ' ' | tr -d '"' > "${WERCKER_OUTPUT_DIR}/tag.out"
deploy:
steps:
- script:
name: restore release tag
code: |
export RELEASE_TAG=$(cat tag.out)
- script:
name: github release
code: |
ghr -t ${GITHUB_TOKEN} -r ${WERCKER_GIT_REPOSITORY} -u ${WERCKER_GIT_OWNER} --delete "${RELEASE_TAG}" pkg