Skip to content

Commit 396a105

Browse files
committed
Merge branch 'hotfix/3.0.2'
* hotfix/3.0.2: (build) Fix truncation of prereleaselabel (build) Sign the bootstapper file GH-537: do not install latest version of chocolatey GH-536: remove empty spaces from ArgumentList
2 parents 6a6fe1a + 0539d6d commit 396a105

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

Boxstarter.Chocolatey/New-PackageFromScript.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ about_boxstarter_chocolatey
5555
$chocoInstall = [System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')
5656
if($chocoInstall -eq $null) {
5757
# Simply Installs choco repo and helpers
58-
Call-Chocolatey -Command 'install' -PackageNames @('chocolatey')
58+
Call-Chocolatey -Command '--version'
5959
$chocoInstall = [System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')
6060
}
6161
if($source -like "*://*"){

Boxstarter.Chocolatey/invoke-chocolatey.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ function Expand-ZipFile($ZipFilePath, $DestinationFolder) {
3434

3535
function Invoke-Chocolatey($chocoArgs) {
3636
Write-BoxstarterMessage "Current runtime is $($PSVersionTable.CLRVersion)" -Verbose
37+
# be sure not to include empty arguments when calling Start-Process
38+
$chocoArgs = $chocoArgs.Where({ $_ -ne "" })
3739

3840
if (-Not $env:ChocolateyInstall) {
3941
[System.Environment]::SetEnvironmentVariable('ChocolateyInstall', "$env:programdata\chocolatey", 'Machine')

BuildScripts/default.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ task Run-GitVersion {
6767
# Having a pre-release label of greater than 10 characters can cause problems when trying to run choco pack.
6868
# Since we typically only see this when building a local feature branch, or a PR, let's just trim it down to
6969
# the 10 character limit, and move on.
70-
if ($versionInfo.PreReleaseLabel) {
70+
if ($versionInfo.PreReleaseLabel -And $versionInfo.PreReleaseLabel.Length -gt 10) {
7171
$prerelease = $versionInfo.PreReleaseLabel.Replace("-","").Substring(0,10)
7272
}
7373

@@ -284,6 +284,7 @@ task Sign-PowerShellFiles -depends Copy-PowerShellFiles {
284284

285285
if($cert) {
286286
Set-AuthenticodeSignature -Filepath $powerShellFiles -Cert $cert -TimeStampServer $timestampServer -IncludeChain NotRoot -HashAlgorithm SHA256
287+
Set-AuthenticodeSignature -Filepath "$basedir\BuildScripts\bootstrapper.ps1" -Cert $cert -TimeStampServer $timestampServer -IncludeChain NotRoot -HashAlgorithm SHA256
287288
}
288289
else {
289290
Write-Host "Unable to sign PowerShell files, as unable to locate certificate and/or password."

0 commit comments

Comments
 (0)