simplify build config and script

This commit is contained in:
Collin M. Barrett 2017-04-14 16:32:00 -05:00
parent 1bfe42ea67
commit 2b4dc48fe8
3 changed files with 6 additions and 34 deletions

View file

@ -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
script:
- ./build.sh --quiet verify

View file

@ -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

View file

@ -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
dotnet restore && dotnet build