From 24ac114627ee9e5a5f37f324d7279677d3669297 Mon Sep 17 00:00:00 2001 From: Ali Bahrami Date: Thu, 12 Mar 2020 11:41:53 +0100 Subject: [PATCH] Update build scripts - Travis-ci: Distro has changed to Ubuntu bionic, Mono changed to 6.8.0 and dotnet sdk to 3.1.102 - Appveyor: image changed to VS2019 - PowerShell script: CakeVersion updated to 0.37.0 - Bash script: DOTNET_INSTALL_URL updated - For both powershell and bash, there was a bug in regex that couldn't detect versions like x.x.x00. - Cake: The project is using `dotnet test` command. `xunit` command replaced with `test` command and arguments chagned to match dotnet test command. #3007 --- .travis.yml | 4 ++-- appveyor.yml | 2 +- build.cake | 4 ++-- build.ps1 | 4 ++-- build.sh | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f0aeadd1e..b989975a93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,12 @@ os: - osx sudo: required -dist: trusty +dist: bionic mono: - 6.8.0 -dotnet: 3.1.100 +dotnet: 3.1.102 script: - ./build.sh --verbosity=minimal diff --git a/appveyor.yml b/appveyor.yml index 823366e30c..3e81258a7d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -image: Visual Studio 2017 +image: Visual Studio 2019 version: 2.0.0-ci000{build} configuration: Release diff --git a/build.cake b/build.cake index e3df3b686c..4b0c434ffe 100644 --- a/build.cake +++ b/build.cake @@ -280,13 +280,13 @@ Task("Test") } var settings = new ProcessSettings { - Arguments = string.Concat("xunit -configuration ", configuration, " -nobuild"), + Arguments = string.Concat("test --configuration ", configuration, " --no-build"), WorkingDirectory = project.GetDirectory() }; if (IsRunningOnUnix()) { - settings.Arguments.Append(string.Concat("-framework ", netCoreTarget)); + settings.Arguments.Append(string.Concat("--framework ", netCoreTarget)); } Information("Executing tests for " + project.GetFilename() + " with arguments: " + settings.Arguments.Render()); diff --git a/build.ps1 b/build.ps1 index 899134d85a..a24bc72943 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,5 +1,5 @@ -$CakeVersion = "0.24.0" -$DotNetVersion = select-string -Path .\global.json -Pattern '[\d]\.[\d]\.[\d]' | % {$_.Matches} | % {$_.Value }; +$CakeVersion = "0.37.0" +$DotNetVersion = select-string -Path .\global.json -Pattern '[\d]\.[\d]\.[\d]*' | % {$_.Matches} | % {$_.Value }; $DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1"; # Make sure tools folder exists diff --git a/build.sh b/build.sh index 08d938be57..9a3d9f7197 100755 --- a/build.sh +++ b/build.sh @@ -3,10 +3,10 @@ # Define directories. SCRIPT_DIR=$PWD TOOLS_DIR=$SCRIPT_DIR/tools -CAKE_VERSION=0.24.0 +CAKE_VERSION=0.37.0 CAKE_DLL=$TOOLS_DIR/Cake.$CAKE_VERSION/Cake.exe -DOTNET_VERSION=$(cat "$SCRIPT_DIR/global.json" | grep -o '[0-9]\.[0-9]\.[0-9]') -DOTNET_INSTRALL_URI=https://raw.githubusercontent.com/dotnet/cli/v$DOTNET_VERSION/scripts/obtain/dotnet-install.sh +DOTNET_VERSION=$(cat "$SCRIPT_DIR/global.json" | grep -o '[0-9]\.[0-9]\.[0-9]*') +DOTNET_INSTRALL_URI=https://dot.net/v1/dotnet-install.sh # Make sure the tools folder exist. if [ ! -d "$TOOLS_DIR" ]; then