Skip to content

Commit

Permalink
- [-] simplify travis test, now that bintray is defunct
Browse files Browse the repository at this point in the history
  • Loading branch information
suntong committed Jun 6, 2021
1 parent 50760c2 commit 88388c2
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 88388c2

Please sign in to comment.