forked from heartbeatsjp/azmon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
33 lines (33 loc) · 999 Bytes
/
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
box: "netmarkjp/golang-build:1.11"
build:
steps:
- wercker/setup-go-workspace:
package-dir: github.com/heartbeatsjp/azmon
- script:
name: "dep ensure"
code: "dep ensure"
- script:
name: "goimports"
code: "goimports -d -e $(find . -type f -name '*.go' | grep -v './vendor')"
- script:
name: "go test"
code: "go test -v ./..."
- tcnksm/gox:
os: "linux"
arch: "amd64"
ldflags: "-X main.Version=$(git describe --tags)"
- script:
name: "archive"
code: |
DIST_DIR="${WERCKER_OUTPUT_DIR:?}/dist"
mkdir ${DIST_DIR:?} || true
cd ${WERCKER_OUTPUT_DIR:?}/pkg
find . -mindepth 1 -maxdepth 1 -type d | while read line; do tar zcfp ${DIST_DIR:?}/$line.tar.gz ${line:?} ; done
cd ${DIST_DIR:?}
md5sum * > MD5SUM
deploy:
steps:
- tcnksm/ghr:
input: dist
replace: true
token: $GITHUB_TOKEN