From c231d4b034fabb4d75c0baf52f9674b79bbbe048 Mon Sep 17 00:00:00 2001 From: Richard Wang Date: Thu, 13 Feb 2014 17:00:33 +1100 Subject: [PATCH 1/3] Show full AssemblyInfo path on bump version fail --- script/Bump-Version.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Bump-Version.ps1 b/script/Bump-Version.ps1 index 16a6e064..8c98acbc 100644 --- a/script/Bump-Version.ps1 +++ b/script/Bump-Version.ps1 @@ -36,7 +36,7 @@ function Write-VersionAssemblyInfo { } if ($numberOfReplacements -ne 3) { - Die "Expected to replace the version number in 3 places in AssemblyInfo.cs (AssemblyVersion, AssemblyFileVersion, AssemblyInformationalVersion) but actually replaced it in $numberOfReplacements" + Die "Expected to replace the version number in 3 places in $assemblyInfo (AssemblyVersion, AssemblyFileVersion, AssemblyInformationalVersion) but actually replaced it in $numberOfReplacements" } $newContent | Set-Content $assemblyInfo -Encoding UTF8 From 753046c5af75f6004b5731930d6979affdd25bb0 Mon Sep 17 00:00:00 2001 From: Richard Wang Date: Thu, 13 Feb 2014 17:13:10 +1100 Subject: [PATCH 2/3] Fix bump-version for sln dir with "Squirrel." --- script/Bump-Version.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/Bump-Version.ps1 b/script/Bump-Version.ps1 index 8c98acbc..8c4bb876 100644 --- a/script/Bump-Version.ps1 +++ b/script/Bump-Version.ps1 @@ -70,7 +70,9 @@ $srcFolder = "$rootFolder\src" $items = Get-ChildItem -Path "$srcFolder" -Filter "AssemblyInfo.cs" -Recurse -$items = $items | Where-Object {$_.FullName.Contains("Squirrel.") -or $_.FullName.COntains("CreateReleasePackage")} +# Get AssemblyInfo.cs files of projects that contain "Squirrel." or are "CreateReleasePackage" +# However the solution itself might be in a folder that contains "Squirrel." so only look at the last bit +$items = $items | Where-Object { ($_.FullName -replace "^.*(?=\\(.*?)\\Properties\\AssemblyInfo\.cs)", "").Contains("Squirrel.") -or $_.FullName.Contains("CreateReleasePackage") } $currentVersion = [System.Version](Read-VersionAssemblyInfo $items[0].FullName) From 0969da999b14e0653beaef64978af30452c31a9b Mon Sep 17 00:00:00 2001 From: Richard Wang Date: Thu, 13 Feb 2014 17:34:58 +1100 Subject: [PATCH 3/3] Friendlier bootstrap fail when Git isn't in PATH --- script/bootstrap.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/script/bootstrap.ps1 b/script/bootstrap.ps1 index 8ca93f54..3163fe07 100644 --- a/script/bootstrap.ps1 +++ b/script/bootstrap.ps1 @@ -5,7 +5,16 @@ $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $rootFolder = (Get-Item $scriptPath).Parent.FullName $srcFolder = "$rootFolder\src" -git submodule init +try { + git submodule init +} catch { + Write-Host "Git not found!" -ForegroundColor Red + Write-Host + Write-Host "If you have Git installed you should add at least PATH_TO_GIT\cmd to your path" + Write-Host "For most people, this would be C:\Program Files (x86)\Git\cmd" + Write-Host + throw +} $nuget = "$srcFolder\.nuget\nuget.exe"