Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Attempt to fix version staggering again (#1339)
Browse files Browse the repository at this point in the history
- NuGet computes dependency versions from the assets file
so specify the right version on restore to see if that
fixes things.
- Also pass the property to build for good measure
  • Loading branch information
davidfowl authored Mar 19, 2017
1 parent 2284b79 commit dd5e004
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[string]$Configuration="Debug",
[string]$Restore="true",
[string]$Channel="preview",
[string]$Version="1.0.0"
[string]$Version="1.0.0",
[string]$BuildVersion=[System.DateTime]::Now.ToString('eyyMMdd-1')
)

Write-Host "Commencing full build for Configuration=$Configuration."
Expand All @@ -22,7 +23,7 @@ $dotnetExePath="$PSScriptRoot\..\dotnet\dotnet.exe"

if ($Restore -eq "true") {
Write-Host "Restoring all packages"
Invoke-Expression "$dotnetExePath restore corefxlab.sln"
Invoke-Expression "$dotnetExePath restore corefxlab.sln /p:VersionSuffix=$BuildVersion"
if ($lastexitcode -ne 0) {
Write-Error "Failed to restore packages."
exit -1
Expand All @@ -34,7 +35,7 @@ $projectsFailed = New-Object System.Collections.Generic.List[String]

foreach ($file in [System.IO.Directory]::EnumerateFiles("$PSScriptRoot\..\src", "System*.csproj", "AllDirectories")) {
Write-Host "Building $file..."
Invoke-Expression "$dotnetExePath build $file -c $Configuration"
Invoke-Expression "$dotnetExePath build $file -c $Configuration /p:VersionSuffix=$BuildVersion"

if ($lastexitcode -ne 0) {
Write-Error "Failed to build project $file"
Expand Down

0 comments on commit dd5e004

Please sign in to comment.