mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-21 04:42:46 +00:00
ci(tunasync): upload to github releases
This commit is contained in:
parent
89f79b975f
commit
e37bb44fa3
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
function die() {
|
function die() {
|
||||||
echo $*
|
echo $*
|
||||||
exit 1
|
exit 1
|
||||||
@ -8,7 +6,7 @@ function die() {
|
|||||||
|
|
||||||
export GOPATH=`pwd`:$GOPATH
|
export GOPATH=`pwd`:$GOPATH
|
||||||
|
|
||||||
make
|
make travis
|
||||||
|
|
||||||
# Initialize profile.cov
|
# Initialize profile.cov
|
||||||
echo "mode: count" > profile.cov
|
echo "mode: count" > profile.cov
|
||||||
@ -19,7 +17,6 @@ ERROR=""
|
|||||||
# Test each package and append coverage profile info to profile.cov
|
# Test each package and append coverage profile info to profile.cov
|
||||||
for pkg in `cat .testpackages.txt`
|
for pkg in `cat .testpackages.txt`
|
||||||
do
|
do
|
||||||
#$HOME/gopath/bin/
|
|
||||||
go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
|
go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
|
||||||
|
|
||||||
[ -f profile_tmp.cov ] && {
|
[ -f profile_tmp.cov ] && {
|
||||||
|
14
.travis.yml
14
.travis.yml
@ -19,3 +19,17 @@ script:
|
|||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- goveralls -coverprofile=profile.cov -service=travis-ci
|
- 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
|
all: get tunasync tunasynctl
|
||||||
|
|
||||||
|
travis: get tunasync tunasynctl travis-package
|
||||||
|
|
||||||
get:
|
get:
|
||||||
go get ./cmd/tunasync
|
go get ./cmd/tunasync
|
||||||
go get ./cmd/tunasynctl
|
go get ./cmd/tunasynctl
|
||||||
@ -14,3 +16,6 @@ tunasync: build
|
|||||||
|
|
||||||
tunasynctl: build
|
tunasynctl: build
|
||||||
go build -o build/tunasynctl -ldflags ${LDFLAGS} github.com/tuna/tunasync/cmd/tunasynctl
|
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