Skip to content

Commit

Permalink
CI and release setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Aug 29, 2016
1 parent bfbe2ce commit 3902cc1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
@@ -0,0 +1,6 @@
language: go
os:
- linux
- osx
script:
- bash ./scripts/travis.sh
15 changes: 15 additions & 0 deletions appveyor.yml
@@ -0,0 +1,15 @@
version: "{build}"
clone_depth: 1
clone_folder: c:\gopath\src\github.com\rhysd\dotfiles-command
environment:
GOPATH: c:\gopath
install:
- echo %PATH%
- echo %GOPATH%
- go version
- go env
- go get -v -t -d ./...
build: off
test_script:
- go test -v ./dotfiles-command/
deploy: off
14 changes: 14 additions & 0 deletions scripts/make-release.sh
@@ -0,0 +1,14 @@
#! /bin/bash

set -e

gox -verbose
mkdir -p release
mv dotfiles-command_* release/
cd release
for bin in `ls`; do
mv "$bin" dotfiles-command
zip "${bin}.zip" dotfiles-command
rm dotfiles-command
done
cd -
18 changes: 18 additions & 0 deletions scripts/travis.sh
@@ -0,0 +1,18 @@
#! /bin/bash

set -e

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew upgrade go
go get -t -d -v ./...
go test -v
else
go get github.com/axw/gocov/gocov
go get github.com/mattn/goveralls
if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
go get -t -d -v ./...
go test -v -coverprofile=coverage.out
$HOME/gopath/bin/goveralls -coverprofile coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
fi

0 comments on commit 3902cc1

Please sign in to comment.