mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:22:46 +00:00
ci(tunasync): upload to github releases
This commit is contained in:
parent
89f79b975f
commit
e37bb44fa3
@ -1,6 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
function die() {
|
||||
echo $*
|
||||
exit 1
|
||||
@ -8,7 +6,7 @@ function die() {
|
||||
|
||||
export GOPATH=`pwd`:$GOPATH
|
||||
|
||||
make
|
||||
make travis
|
||||
|
||||
# Initialize profile.cov
|
||||
echo "mode: count" > profile.cov
|
||||
@ -19,10 +17,9 @@ ERROR=""
|
||||
# Test each package and append coverage profile info to profile.cov
|
||||
for pkg in `cat .testpackages.txt`
|
||||
do
|
||||
#$HOME/gopath/bin/
|
||||
go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
|
||||
|
||||
[ -f profile_tmp.cov ] && {
|
||||
go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
|
||||
|
||||
[ -f profile_tmp.cov ] && {
|
||||
tail -n +2 profile_tmp.cov >> profile.cov || die "Unable to append coverage for $pkg"
|
||||
}
|
||||
done
|
||||
|
14
.travis.yml
14
.travis.yml
@ -19,3 +19,17 @@ script:
|
||||
|
||||
after_success:
|
||||
- goveralls -coverprofile=profile.cov -service=travis-ci
|
||||
|
||||
before_deploy: "echo 'ready to deploy?'"
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
file:
|
||||
- "build/tunasync-linux-bin.tar.gz"
|
||||
api_key:
|
||||
secure: "F9kaVaR1mxEh2+EL9Nm8GZmbVY98pXCJA0LGDNrq1C2vU61AUNOeX6yI1mMklHNZPLBqoFDvGN1M5HnJ+xWCFH+KnJgLD2GVIAcAxFNpcNWQe8XKE5heklNsIQNQfuh/rJKM6YzeDB9G5RN4Y76iL4WIAXhNnMm48W6jLnWhf70="
|
||||
skip_cleanup: true
|
||||
overwrite: true
|
||||
on:
|
||||
tags: true
|
||||
all_branches: true
|
||||
|
5
Makefile
5
Makefile
@ -2,6 +2,8 @@ LDFLAGS="-X main.buildstamp=`date -u '+%s'` -X main.githash=`git rev-parse HEAD`
|
||||
|
||||
all: get tunasync tunasynctl
|
||||
|
||||
travis: get tunasync tunasynctl travis-package
|
||||
|
||||
get:
|
||||
go get ./cmd/tunasync
|
||||
go get ./cmd/tunasynctl
|
||||
@ -14,3 +16,6 @@ tunasync: build
|
||||
|
||||
tunasynctl: build
|
||||
go build -o build/tunasynctl -ldflags ${LDFLAGS} github.com/tuna/tunasync/cmd/tunasynctl
|
||||
|
||||
travis-package: tunasync tunasynctl
|
||||
tar zcf build/tunasync-linux-bin.tar.gz -C build tunasync tunasynctl
|
||||
|
Loading…
x
Reference in New Issue
Block a user