forked from oskanberg/slack-tube-service
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
271 additions
and
17 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
slack-tube-service | ||
vendor/ | ||
.idea/* | ||
tokens.txt | ||
coverage.out | ||
/bin | ||
*.db | ||
tags | ||
.vscode | ||
.vscode | ||
dist |
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,33 @@ | ||
language: go | ||
go: | ||
- master | ||
install: | ||
- go get -t -d -v ./... | ||
sudo: required | ||
before_script: | ||
- go get golang.org/x/tools/cmd/cover | ||
- go get github.com/mattn/goveralls | ||
script: go test -v ./... -covermode=count -coverprofile=coverage.out | ||
after_script: | ||
- goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN | ||
before_deploy: | ||
- go get github.com/mitchellh/gox | ||
- gox -ldflags "-X main.AppVersion=$TRAVIS_TAG -X main.Sha=$TRAVIS_COMMIT" -output "dist/slack-tube-service-{{.OS}}-{{.Arch}}" | ||
- sudo chmod +x ./dist/* | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: USgcg/9s83bKhyi/Rpe6PG5YuyEROmhQz/lBffhGiggxsau6j+lfxFQYyIKXq4tbVLZ2xUqpS/+8rT9vIrvdQCsqZts7aa4VHSHq/t56ASQcfOhXhUjV7u3VVElZnCzwTp08Ib0Voq6nerjRUGsAcwZtc5u7Ix/HO4Ly7+CsyGKHVmHxb1WSWnzF2nbV2MCjs2cP39Im2/BZmmMfgdaFWqHl+m6qz83Zb3DMVGUDQyuqWVoyyUHiFJih8wZ5GymbcC1C0ozN0QMRWOXYpoBQnkr4uL0VyPadt925F7QO2zyK+3sg3SFZRa9SoGeUB8PqvRZcOj+R/CfDjK+mu3dMtJ5Sb+DKlSdbccHVW8RWnB/6CrM/sr+SY9no0TLLA5VVbX3dV2VKxmKms7wKEelfZm2hGtTKbnxbbTs8NpH7LSCcfcUN966J3zcCf5mtDd1pmTntFyCuumr+t2H9AmCVHm9tmb741SRFdD6jzsuRylHjvXuL5h4/ZvGLeyVH4beK/R5xQGxJKIVcf4hQ8fufTUsIgPwKkEVyiUneOOODzX9NN9sguaNfhDhQ6lfJu2I8OBsSVyvoptsPb3gmotzz8+r9/rxceoo9K2t4NJBJHLchn3WPmkgHyC68dQPU4qZ9ET2GHEaEtLc+9Hk9yO0CvOu/G8MtvWtKDI5VDlpY70U= | ||
file_glob: true | ||
file: dist/* | ||
skip_cleanup: true | ||
on: | ||
repo: thoeni/slack-tube-service | ||
tags: true | ||
condition: "$TRAVIS_TAG =~ ^v[0-9]+(.[0-9]+)*" | ||
deploy: | ||
provider: script | ||
script: deploy_prod.sh | ||
on: | ||
repo: thoeni/slack-tube-service | ||
branch: master |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,62 @@ | ||
|
||
# Gopkg.toml example | ||
# | ||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md | ||
# for detailed Gopkg.toml documentation. | ||
# | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project" | ||
# version = "1.0.0" | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project2" | ||
# branch = "dev" | ||
# source = "github.com/myfork/project2" | ||
# | ||
# [[override]] | ||
# name = "github.com/x/y" | ||
# version = "2.4.0" | ||
|
||
|
||
[[constraint]] | ||
name = "github.com/aws/aws-sdk-go" | ||
version = "1.10.26" | ||
|
||
[[constraint]] | ||
name = "github.com/boltdb/bolt" | ||
version = "1.3.1" | ||
|
||
[[constraint]] | ||
name = "github.com/golang/mock" | ||
version = "1.0.0" | ||
|
||
[[constraint]] | ||
name = "github.com/gorilla/mux" | ||
version = "1.4.0" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/gorilla/schema" | ||
|
||
[[constraint]] | ||
name = "github.com/pkg/errors" | ||
version = "0.8.0" | ||
|
||
[[constraint]] | ||
name = "github.com/prometheus/client_golang" | ||
version = "0.8.0" | ||
|
||
[[constraint]] | ||
name = "github.com/rs/cors" | ||
version = "1.2.0" | ||
|
||
[[constraint]] | ||
name = "github.com/stretchr/testify" | ||
version = "1.1.4" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/thoeni/go-tfl" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
ssh ec2-user@services.thoeni.io 'pkill -f slack-tube-service' | ||
./mkbin.sh linux | ||
scp bin/slack-tube-service-linux-amd64 ec2-user@services.thoeni.io:~/ | ||
scp dist/slack-tube-service-linux-amd64 ec2-user@services.thoeni.io:~/ | ||
ssh ec2-user@services.thoeni.io screen -d -m './slack-tube-service-linux-amd64 &' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
#!/bin/bash | ||
BUILD_VERSION=$(git describe --tags --always) | ||
CID=$(git log --format="%H" -n 1) | ||
if [ "$1" = "linux" ] || [ "$1" = "" ]; then | ||
echo "Generating Linux binary" | ||
env GOOS=linux GOARCH=amd64 go build -o bin/slack-tube-service-linux-amd64 | ||
env GOOS=linux GOARCH=amd64 go build -ldflags "-X main.AppVersion=$BUILD_VERSION -X main.Sha=$CID" -o dist/slack-tube-service-$BUILD_VERSION-linux-amd64 | ||
fi | ||
if [ "$1" = "windows" ] || [ "$1" = "" ]; then | ||
echo "Generating Windows binary" | ||
env GOOS=windows GOARCH=amd64 go build -o bin/slack-tube-service.exe | ||
env GOOS=windows GOARCH=amd64 go build -ldflags "-X main.AppVersion=$BUILD_VERSION -X main.Sha=$CID" -o dist/slack-tube-service-$BUILD_VERSION-windows-amd64.exe | ||
fi | ||
if [ "$1" = "mac" ] || [ "$1" = "" ]; then | ||
echo "Generating MacOS binary" | ||
env GOOS=darwin GOARCH=amd64 go build -o bin/slack-tube-service-darwin | ||
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.AppVersion=$BUILD_VERSION -X main.Sha=$CID" -o dist/slack-tube-service-$BUILD_VERSION-darwin-amd64 | ||
fi | ||
echo "Done!" | ||
ls -al bin/ | ||
ls -al dist/ |
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