Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a85af9eb8bf1
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7f5d420519aa
Choose a head ref
  • 7 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 24, 2020

  1. Copy the full SHA
    014a439 View commit details
  2. list available versions

    eggrobin committed Jul 24, 2020
    Copy the full SHA
    f6c7ebf View commit details
  3. pre.

    eggrobin committed Jul 24, 2020
    Copy the full SHA
    15fc62c View commit details
  4. tuple

    eggrobin committed Jul 24, 2020
    Copy the full SHA
    91f80cc View commit details
  5. ()

    eggrobin committed Jul 24, 2020
    Copy the full SHA
    62b7314 View commit details
  6. double

    eggrobin committed Jul 24, 2020
    Copy the full SHA
    8f41cde View commit details

Commits on Jul 25, 2020

  1. Merge pull request #2654 from eggrobin/find-leniently

    Accept other Visual Studio versions, except when releasing
    eggrobin authored Jul 25, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7f5d420 View commit details
Showing with 56 additions and 6 deletions.
  1. +55 −5 find_msbuild.ps1
  2. +1 −1 make_principia_release.ps1
60 changes: 55 additions & 5 deletions find_msbuild.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
$version = "16.6.1"
param([switch]$strict = $false)

$version = "16.6.2"
$preview = ""

if ($preview.length -gt 0) {
$description = "version $version preview $preview"
$path = "VisualStudioPreview/$version-pre.$preview."
$path = "VisualStudioPreview/$version-pre.$preview.0+"
} else {
$description = "version $version"
$path = "VisualStudio/$version+"
@@ -29,6 +32,53 @@ foreach ($name in $names) {
++$i
}

write-error(
"Could not find Visual Studio $description;" +
" found the following versions:`n$([string]::join("`n", $names))")
function version-tuple($name) {
$tuple = [double[]]$name.split(@("/", "+"))[1].split(
[string[]]@(".", "-pre."), [StringSplitOptions]::none)
if ($tuple.length -lt 5) {
# Count non-previews as preview ∞.0.
$tuple = $tuple + @((1.0 / 0.0), 0.0)
}
return [tuple]::Create($tuple[0], $tuple[1], $tuple[2], $tuple[3], $tuple[4])
}

if ($strict) {
write-error ("Could not find Visual Studio $description;" +
" found the following versions:`n$(
[string]::join("`n", $names))")
} else {
$earlier = $null
$earlier_index = $null
$later = $null
$later_index = $null
$i = 0
foreach ($name in $names) {
if (((version-tuple $name) -lt (version-tuple $path)) -and
(($earlier -eq $null) -or
((version-tuple $name) -gt (version-tuple $earlier)))) {
$earlier = $name
$earlier_index = $i
}
if (((version-tuple $name) -gt (version-tuple $path)) -and
(($later -eq $null) -or
((version-tuple $name) -lt (version-tuple $later)))) {
$later = $name
$later_index = $i
}
++$i
}
if ($later -ne $null) {
$best_match = $later
$i = $later_index
} elseif ($earlier -ne $null) {
$best_match = $earlier
$i = $earlier_index
} else {
write-error "Could not find Visual Studio"
exit 1
}
write-warning ("Could not find Visual Studio $description;" +
" falling back to $best_match from:`n$(
[string]::join("`n", $names))")
return ($msbuildpaths | select-object -index $i)
}
2 changes: 1 addition & 1 deletion make_principia_release.ps1
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ if (!($date -match '^\d{10}$')) {
exit 1
}

$msbuild = &".\find_msbuild.ps1"
$msbuild = &".\find_msbuild.ps1" -strict
$7zip = "${Env:ProgramW6432}\7-Zip\7z.exe"
if (!(test-path -path $7zip)) {
write-error ("Could not find 7-Zip.")