-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
32 lines (22 loc) · 927 Bytes
/
build.sh
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
#!/usr/bin/env bash
#exit if any command fails
set -e
artifactsFolder="./artifacts"
if [ -d $artifactsFolder ]; then
rm -R $artifactsFolder
fi
dotnet restore
# Ideally we would use the 'dotnet test' command to test netcoreapp and net451 so restrict for now
# but this currently doesn't work due to https://github.com/dotnet/cli/issues/3073 so restrict to netcoreapp
# Instead, run directly with mono for the full .net version
#dotnet build ./test/TEST_PROJECT_NAME -c Release -f net451
dotnet build
#dotnet test ./test/TEST_PROJECT_NAME -c Release -f netcoreapp1.0
dotnet restore ./test
dotnet test ./test
#mono \
#./test/TEST_PROJECT_NAME/bin/Release/net451/*/dotnet-test-xunit.exe \
#./test/TEST_PROJECT_NAME/bin/Release/net451/*/TEST_PROJECT_NAME.dll
revision=${TRAVIS_JOB_ID:=1}
revision=$(printf "%04d" $revision)
#dotnet pack ./src/PROJECT_NAME -c Release -o ./artifacts --version-suffix=$revision