-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [-] simplify travis test, now that bintray is defunct
- Loading branch information
Showing
1 changed file
with
0 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,77 +2,10 @@ | |
|
||
language: go | ||
|
||
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_NAME="wireframe" | ||
- PKG_URL="https://github.com/go-easygen/wireframe" | ||
- PKG_CAT=utils | ||
- PKG_ARCH=amd64 | ||
- PKG_DESC="wire-frame construction to get the project quickly into shape" | ||
- PKG_VEND="go-easygen" | ||
- PKG_MAINT='Tong Sun <[email protected]>' | ||
- PKG_LICNS="MIT" | ||
# Build time setup | ||
- TZ=America/Toronto | ||
- DATE_BUILD=`date -I` | ||
|
||
script: | ||
|
||
- date | ||
- echo $DATE_BUILD $VERSION | ||
- echo | ||
|
||
- go get -t -v ./... | ||
- go build -v -ldflags="-X main.date=$DATE_BUILD" | ||
- wireframe | ||
- go test -v ./... | ||
|
||
- go get github.com/mitchellh/gox | ||
- gox -ldflags="-X main.date=$DATE_BUILD" -osarch="linux/386 linux/amd64 darwin/amd64 windows/amd64" -output="out/{{.Dir}}-{{.OS}}-{{.Arch}}" | ||
# linux/386 linux/amd64 linux/arm darwin/amd64 darwin/386 windows/amd64 windows/386 | ||
# e.g.: out/wireframe-linux-amd64 | ||
|
||
# Create Debian Package | ||
- mkdir -p build | ||
- cp -v out/${PKG_NAME}-linux-amd64 build/${PKG_NAME} | ||
- gem install fpm --no-document | ||
- mkdir -p pkg | ||
- >- | ||
fpm --verbose -s dir -t deb | ||
--name ${PKG_NAME} | ||
--package pkg/${PKG_NAME}.deb | ||
--force | ||
--deb-compression bzip2 | ||
--url "${PKG_URL}" | ||
--category ${PKG_CAT} | ||
--description "${PKG_DESC}" | ||
--maintainer "${PKG_MAINT}" | ||
--vendor "${PKG_VEND}" | ||
--license "${PKG_LICNS}" | ||
--version ${VERSION} | ||
--architecture ${PKG_ARCH} | ||
--depends apt | ||
--deb-compression gz | ||
./build/=/usr/bin/ | ||
# --deb-compression gz: https://unix.stackexchange.com/questions/441032/ | ||
- ar t pkg/${PKG_NAME}.deb | ||
|
||
- sed -i -e "s/\$VERSION/$VERSION/" bintray-bin.json bintray-pkg.json | ||
- sed -i -e "s/\$DATE/$DATE_BUILD/" bintray-bin.json bintray-pkg.json | ||
|
||
deploy: | ||
- provider: bintray | ||
user: suntong | ||
key: ${BINTRAY_API_KEY} | ||
file: bintray-bin.json | ||
skip_cleanup: true | ||
|
||
- provider: bintray | ||
user: suntong | ||
key: $BINTRAY_API_KEY | ||
file: bintray-pkg.json | ||
skip_cleanup: true | ||
on: | ||
# tags: true |