Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions script/Bump-Version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
11 changes: 10 additions & 1 deletion script/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down