From 7f71ed594c908cd7d8aeeac4b5286334bf150d6a Mon Sep 17 00:00:00 2001 From: Jay Asbury Date: Sun, 11 Sep 2022 15:50:57 -0400 Subject: [PATCH] Allow for build to use latest version of dotnet SDK/Runtime with flag --- appveyor.yml | 7 +++++++ scripts/Mark-RepoClean.ps1 | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index b2a9431742a..5ccf95ab3fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,6 +18,8 @@ environment: DOTNET_NOLOGO: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build. DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + # Use latest version of current used .NET version. 6.0 could use the latest of 6.0. See .\Scripts\Update-DotnetVersion.ps1 + GE_USE_LATEST_DOTNET: false init: - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) @@ -35,6 +37,11 @@ build: verbosity: minimal install: +- ps: | + if($env:GE_USE_LATEST_DOTNET -eq $true) + { + .\scripts\Update-DotnetVersion.ps1 + } - ps: | Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./dotnet-install.ps1" ./dotnet-install.ps1 -JsonFile global.json -InstallDir 'C:\Program Files\dotnet' diff --git a/scripts/Mark-RepoClean.ps1 b/scripts/Mark-RepoClean.ps1 index 819274cb575..2a193729830 100644 --- a/scripts/Mark-RepoClean.ps1 +++ b/scripts/Mark-RepoClean.ps1 @@ -2,6 +2,10 @@ pushd $PSScriptRoot\.. +# If the .NET SDK/runtime version was updated - make build clean +& git update-index --skip-worktree global.json +& git update-index --skip-worktree scripts/RepoLayout.props + # iterate through each submodule and mark each AssemblyInfo.cs in a submodule as clean $submodules = git submodule --quiet foreach --recursive 'echo $name' $submodules | ForEach-Object {