mirror of
https://github.com/tuna/tunasync.git
synced 2025-06-13 04:17:00 +00:00
Bye Travis!
This commit is contained in:
parent
ada881850a
commit
3a2888dd5d
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
function die() {
|
||||
echo $*
|
||||
exit 1
|
||||
}
|
||||
|
||||
export GOPATH=`pwd`:$GOPATH
|
||||
|
||||
make travis
|
||||
|
||||
# Initialize profile.cov
|
||||
echo "mode: count" > profile.cov
|
||||
|
||||
# Initialize error tracking
|
||||
ERROR=""
|
||||
|
||||
# Test each package and append coverage profile info to profile.cov
|
||||
for pkg in `cat .testpackages.txt`
|
||||
do
|
||||
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
|
||||
|
||||
if [ ! -z "$ERROR" ]
|
||||
then
|
||||
die "Encountered error, last error was: $ERROR"
|
||||
fi
|
41
.travis.yml
41
.travis.yml
@ -1,41 +0,0 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.13
|
||||
|
||||
before_install:
|
||||
- sudo apt-get install cgroup-bin
|
||||
- go get github.com/smartystreets/goconvey
|
||||
- go get golang.org/x/tools/cmd/cover
|
||||
- go get -v github.com/mattn/goveralls
|
||||
|
||||
os:
|
||||
- linux
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_script:
|
||||
- lssubsys -am
|
||||
- sudo cgcreate -a $USER -t $USER -g cpu:tunasync
|
||||
- sudo cgcreate -a $USER -t $USER -g memory:tunasync
|
||||
- docker pull alpine
|
||||
|
||||
script:
|
||||
- ./.testandcover.bash
|
||||
|
||||
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: ZOYL/CALrVJsZzbZqUMSI89Gw4zsBJH1StD/2yTyG45GfKgvtK4hG0S5cQM/L0wcikjEkgxSMsmr4ycq+OwbN++gc0umfoAQ/VSjzetiobAlT1E854aRKRjT82WxYdnPW2fsFjuEJTcyZmcbgJGTMi86MDt7w8tEjLomhd1+rUo=
|
||||
overwrite: true
|
||||
on:
|
||||
tags: true
|
||||
all_branches: true
|
||||
repo: tuna/tunasync
|
5
Makefile
5
Makefile
@ -2,8 +2,6 @@ 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
|
||||
@ -17,8 +15,5 @@ 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
|
||||
|
||||
test:
|
||||
go test -v -covermode=count -coverprofile=profile.cov ./...
|
||||
|
14
README.md
14
README.md
@ -1,8 +1,8 @@
|
||||
tunasync
|
||||
========
|
||||
|
||||
[](https://travis-ci.org/tuna/tunasync)
|
||||
[](https://coveralls.io/github/tuna/tunasync?branch=dev)
|
||||

|
||||
[](https://coveralls.io/github/tuna/tunasync?branch=master)
|
||||
[](http://commitizen.github.io/cz-cli/)
|
||||

|
||||
|
||||
@ -53,14 +53,10 @@ PreSyncing Syncing Succe
|
||||
|
||||
## Building
|
||||
|
||||
Setup GOPATH like [this](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable).
|
||||
|
||||
Then:
|
||||
Go version: 1.13
|
||||
|
||||
```
|
||||
go get -d github.com/tuna/tunasync/cmd/tunasync
|
||||
cd $GOPATH/src/github.com/tuna/tunasync
|
||||
make
|
||||
make all
|
||||
```
|
||||
|
||||
If you have multiple `GOPATH`s, replace the `$GOPATH` with your first one.
|
||||
Binaries in the `build/`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user