forked from Splamy/TS3AudioBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (66 loc) · 1.73 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
sudo: false
language: csharp
matrix:
include:
- dotnet: 2.1.4
mono: none
env: DOTNETCORE=1
- mono: latest
notifications:
email: false
branches:
only:
- master
- develop
addons:
apt:
packages:
- zip
- gzip
- tar
- curl
git:
depth: 9999999
# TODO: add test runner for dotnet core too
install:
- |
if [[ $DOTNETCORE = 1 ]]; then
echo "dotnet core"
dotnet restore TS3AudioBot.sln
else
echo "mono"
nuget restore TS3AudioBot.sln
nuget install NUnit.Runners -OutputDirectory nunit
fi
script:
- |
if [[ $DOTNETCORE = 1 ]]; then
dotnet build --framework netcoreapp2.0 --configuration Release TS3AudioBot
else
if command -v msbuild; then
buildtool="msbuild"
elif command -v xbuild; then
buildtool="xbuild"
else
echo "No mono build tool found!"
false
fi
"${buildtool}" /p:Configuration=Release /p:TargetFramework=net46 TS3AudioBot.sln
mono ./nunit/NUnit.ConsoleRunner.*.*.*/tools/nunit3-console.exe ./TS3ABotUnitTests/bin/Release/net46/TS3ABotUnitTests.dll
fi
after_success:
- |
if [[ $DOTNETCORE = 1 ]]; then
echo "No Task!"
else
export MAIN_DIR=`pwd`
cd ./TS3AudioBot/bin/Release/net46
ls
zip TS3AudioBot.zip NLog.config *.exe *.dll x64/* x86/*
export version=`mono TS3AudioBot.exe --version | grep "Version: "`
curl -I -H "Content-Type: application/zip" -X PUT "https://splamy.de/api/nightly/ts3ab/${TRAVIS_BRANCH}?token=${uploadkey}&filename=TS3AudioBot.zip&commit=${TRAVIS_COMMIT}&version=${version:9}" --upload-file ./TS3AudioBot.zip
cd "$MAIN_DIR"
fi
after_script:
- chmod u+x ts3notify.sh
- ./ts3notify.sh