-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
55 lines (46 loc) · 1.35 KB
/
.travis.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
# -*- yaml -*-
language: go
go:
- 1.9
env:
global:
# Package setup (Ref: http://pkg-go.alioth.debian.org/packaging.html)
- VERSION="${TRAVIS_TAG:=0.0~git$(date +%Y%m%d)-1}"
- PKG_URL="https://github.com/go-xmlfmt/htmlextract"
- PKG_CAT=utils
- PKG_ARCH=amd64
- PKG_DESC="HTML Extraction Tool"
- PKG_VEND="go-xmlfmt"
- PKG_MAINT="Antonio Sun <[email protected]>"
- PKG_LICNS="MIT"
# Build time setup
- TZ=America/Toronto
- DATE_BUILD=`date -I`
script:
- go get -t -v ./...
- go build -v -ldflags="-X main.date=$DATE_BUILD"
- htmlextract
- go test -v ./...
- ( cd test; ./shell_test.sh )
- go get github.com/mitchellh/gox
- gox -ldflags="-X main.date=$DATE_BUILD" -osarch="linux/386 linux/amd64 windows/amd64 windows/386 darwin/amd64" -output="out/{{.Dir}}-{{.OS}}-{{.Arch}}"
# linux/386 linux/amd64 linux/arm darwin/amd64 darwin/386
- out/htmlextract-linux-amd64
before_deploy:
- gem install fpm --no-document
- make pkg
- sed -i -e "s/\$VERSION/$VERSION/" bintray-pkg.json
- sed -i -e "s/\$DATE/$DATE_BUILD/" bintray-pkg.json
deploy:
- provider: bintray
user: antoniosun
key: ${BINTRAY_API_KEY}
file: bintray-bin.json
skip_cleanup: true
- provider: bintray
user: antoniosun
key: $BINTRAY_API_KEY
file: bintray-pkg.json
skip_cleanup: true
on:
# tags: true