diff --git a/.travis.yml b/.travis.yml index 7cf66cca3..63975a2de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: csharp -sudo: required -dist: trusty -solution: FilterLists.sln +dist: trusty +sudo: required mono: none dotnet: 1.0.1 -script: - - ./build.sh \ No newline at end of file +script: + - ./build.sh --quiet verify \ No newline at end of file diff --git a/FilterLists.sln b/FilterLists.sln index f604fe064..8625779d0 100644 --- a/FilterLists.sln +++ b/FilterLists.sln @@ -20,6 +20,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6EF78534-FCFD-4918-91AA-316D8AA951AA}" ProjectSection(SolutionItems) = preProject .travis.yml = .travis.yml + build.sh = build.sh EndProjectSection EndProject Global diff --git a/build.sh b/build.sh index 750ac8cc3..afb73f928 100644 --- a/build.sh +++ b/build.sh @@ -1,30 +1,2 @@ #!/usr/bin/env bash -# https://andrewlock.net/adding-travis-ci-to-a-net-core-app/ - -# 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 - -# dotnet test ./test/TEST_PROJECT_NAME -c Release -f netcoreapp1.0 - -# Instead, run directly with mono for the full .net version -# dotnet build ./test/TEST_PROJECT_NAME -c Release -f net451 - -# 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/FilterLists.Api.csproj -c Release -o ./artifacts --version-suffix=$revision \ No newline at end of file +dotnet restore && dotnet build \ No newline at end of file