Skip to content

Commit

Permalink
Allow for build to use latest version of dotnet SDK/Runtime with flag
Browse files Browse the repository at this point in the history
  • Loading branch information
vbjay committed Sep 12, 2022
1 parent 27583c5 commit 7f71ed5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand All @@ -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'
Expand Down
4 changes: 4 additions & 0 deletions scripts/Mark-RepoClean.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7f71ed5

Please sign in to comment.