-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from haya14busa/travis
CI
- Loading branch information
Showing
8 changed files
with
101 additions
and
11 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
release |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
language: go | ||
|
||
go: | ||
- 1.7 | ||
- tip | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
before_install: | ||
- make deps | ||
|
||
script: | ||
- uname | ||
- make lint | ||
- go test -v -race ./... | ||
- goveralls -service=travis-ci | ||
|
||
before_deploy: make release | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: pMpSqWsjmn1p7+mJB3XcDlvkD+Kldlho16Inqhl4JEPjM+MYg+L1lT91ZShgOldtgk6YY9e126cAKNOhwDhah4941euhng/PryVeDnxqaYJIlU6yL/60NasvAcp2dybSWvyTov549bjBTy0b4tz6vzAd244q39Z5Fg8NllUvGmNMKgKZHAC2GBLejP01+Xpd1Tj++//JfpD/kjef/Ck004pT64/xcZBh40Yj8QGNi08+wTeU1EuJcHdMnAcd011sVhDNIaQHfRkjVMahVuUApApguHZmodw0hlFhFIy7IKiQOHe52gMDpo549jGBKq2oQAHea/uPV7+EsPEv/YwlYfjb4mLD5pyM9oCK8LGjSeEKWj8BXVWQcLQZfp4Nid0A4oC5hyAaZD7MvWc8Gd4RPzu3h51m0K4cRQ2c6V7gRpkJWi1VfjNu//N0ZAWeDa1xQ72CAd0ddRNfRbNIFRxFkhwTIPNsjAG7GvGYdVYN1xT3LmnXLmbAuP+A48GGlBLBmPBPnfdcuQeNGlimegiOFcC3PzYN0H3HyMdIZ0c1UxXlt/TUiSK07rdfWjtdP9vvtMLfq67SLLhS8bamDUGBfSgJImSDcHqYUfgyz3YtNrf5n6Ubc59HF1ONxxdFJpBxoqqDnoojiUsQ9rzjSZ2xW83K5KajoedoMmXKTSpt9MM= | ||
file: | ||
- release/goplay-linux-amd64 | ||
- release/goplay-linux-386 | ||
- release/goplay-linux-arm | ||
- release/goplay-windows-amd64.exe | ||
- release/goplay-windows-386.exe | ||
- release/goplay-darwin-amd64 | ||
- release/goplay-darwin-386 | ||
skip_cleanup: true | ||
on: | ||
tags: true |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Prefer go commands for basic tasks like `build`, `test`, etc... | ||
|
||
.PHONY: deps lint release | ||
|
||
deps: | ||
go get -d -v -t ./... | ||
go get github.com/mattn/goveralls | ||
go get golang.org/x/tools/cmd/cover | ||
go get github.com/golang/lint/golint | ||
go get github.com/kisielk/errcheck | ||
go get github.com/client9/misspell/cmd/misspell | ||
|
||
lint: deps | ||
! gofmt -d -s . | grep '^' # exit 1 if any output given | ||
! golint ./... | grep '^' | ||
go vet ./... | ||
errcheck -asserts -ignoretests -ignore 'Close' | ||
misspell -error **/*.go **/*.md | ||
|
||
# https://github.com/golang/go/wiki/HostedContinuousIntegration | ||
# https://loads.pickle.me.uk/2015/08/22/easy-peasy-github-releases-for-go-projects-using-travis/ | ||
package = github.com/haya14busa/goplay/cmd/goplay | ||
|
||
release: deps | ||
mkdir -p release | ||
GOOS=linux GOARCH=amd64 go build -o release/goplay-linux-amd64 $(package) | ||
GOOS=linux GOARCH=386 go build -o release/goplay-linux-386 $(package) | ||
GOOS=linux GOARCH=arm go build -o release/goplay-linux-arm $(package) | ||
GOOS=windows GOARCH=amd64 go build -o release/goplay-windows-amd64.exe $(package) | ||
GOOS=windows GOARCH=386 go build -o release/goplay-windows-386.exe $(package) | ||
GOOS=darwin GOARCH=amd64 go build -o release/goplay-darwin-amd64 $(package) | ||
GOOS=darwin GOARCH=386 go build -o release/goplay-darwin-386 $(package) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '{build}' | ||
|
||
clone_folder: c:\gopath\src\github.com\haya14busa\goplay | ||
|
||
environment: | ||
GOPATH: c:\gopath | ||
|
||
install: | ||
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH% | ||
- go version | ||
- go env | ||
- go get -t -d -v ./... | ||
|
||
build_script: | ||
- go build -v | ||
|
||
test_script: | ||
- go test -v -race ./... |
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 |
---|---|---|
|
@@ -61,7 +61,7 @@ func main() { | |
|
||
fmt.Println(url) | ||
if *openBrowser { | ||
open.Start(url) | ||
fatalIf(open.Start(url)) | ||
} | ||
} | ||
} | ||
|
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
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
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