Skip to content

Commit ea42cee

Browse files
committed
Merge branch 'hotfix/3.0.1'
* hotfix/3.0.1: GH-518: fix Call-Chocolatey usage (GH-532) Use 'choco install' instead of cinst (#533) (#524) Fix Build Handling of Long Prerelease (maint) eol consistency (maint) .gitattributes new line (GH-501) Fix Propagation of VerbosePreference (#512) (#508) Fix package iconUrl Fixed typo in README.md Update README.md (maint) Re-instate the Boxstarter logo (maint) link boxstarter.org repository (maint) crlf in Markdown files!
2 parents 9a5a3ae + f72336e commit ea42cee

15 files changed

+44
-16
lines changed

.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
* text=auto
33

44
# Declare files that will always have CRLF line endings on checkout.
5-
*.md text eol=crlf
5+
*.md text eol=crlf
6+

Boxstarter.Chocolatey/Chocolatey.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ function Export-BoxstarterVars {
622622

623623
function Export-ToEnvironment($varToExport, $scope) {
624624
$val = Invoke-Expression "`$$($scope):$varToExport"
625-
if ($val -is [string] -or $val -is [boolean]) {
625+
if ($val -is [string] -or $val -is [boolean] -or $val -is [system.management.automation.actionpreference]) {
626626
Set-Item -Path "Env:\BEX.$varToExport" -Value $val.ToString() -Force
627627
}
628628
elseif ($null -eq $val) {

Boxstarter.Chocolatey/New-PackageFromScript.ps1

+1-1
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
58+
Call-Chocolatey -Command 'install' -PackageNames @('chocolatey')
5959
$chocoInstall = [System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')
6060
}
6161
if($source -like "*://*"){

Boxstarter.Chocolatey/invoke-chocolatey.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function Invoke-Chocolatey($chocoArgs) {
8080
UseNewEnvironment = $false
8181
Wait = $false
8282
WorkingDirectory = $targetWdir
83-
Verbose = $VerbosePreference
83+
Verbose = ($global:VerbosePreference -eq "Continue")
8484
}
8585

8686
$p = Start-Process @pargs

BuildScripts/bootstrapper.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ function Get-Boxstarter {
4545
$chocoVersion = "2.9.17"
4646
try {
4747
New-Object -TypeName Version -ArgumentList $chocoVersion.split('-')[0] | Out-Null
48-
$command = "cinst Boxstarter -y"
48+
$command = "choco install Boxstarter -y"
4949
}
5050
catch{
5151
# if there is no -v then its an older version with no -y
52-
$command = "cinst Boxstarter"
52+
$command = "choco install Boxstarter"
5353
}
5454
$command += " --version $version"
5555
Invoke-Expression $command

BuildScripts/default.ps1

+11-1
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,23 @@ task Run-GitVersion {
5858

5959
$versionInfo = $joined | ConvertFrom-Json
6060

61-
$prerelease = $versionInfo.PreReleaseLabel
6261
$sha = $versionInfo.Sha.Substring(0,8)
6362
$majorMinorPatch = $versionInfo.MajorMinorPatch
6463
$buildDate = Get-Date -Format "yyyyMMdd"
6564
$script:changeset = $versionInfo.Sha
6665
$script:version = $versionInfo.AssemblySemVer
6766

67+
# Having a pre-release label of greater than 10 characters can cause problems when trying to run choco pack.
68+
# Since we typically only see this when building a local feature branch, or a PR, let's just trim it down to
69+
# the 10 character limit, and move on.
70+
$prerelease = $versionInfo.PreReleaseLabel.Replace("-","").Substring(0,10)
71+
72+
# Chocolatey doesn't support a prerelease that starts with a digit.
73+
# If we see a digit here, merely replace it with an `a` to get around this.
74+
if ($prerelease -match "^\d") {
75+
$prerelease = "a$($prerelease.Substring(1,9))"
76+
}
77+
6878
if ($isTagged) {
6979
$script:packageVersion = $versionInfo.LegacySemVer
7080
$script:informationalVersion = $versionInfo.InformationalVersion

BuildScripts/nuget/Boxstarter.Azure.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<owners>Matt Wrock, Rob Reynolds, Gary Ewan Park</owners>
88
<copyright>2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock</copyright>
99
<title>Boxstarter Azure Module</title>
10-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
10+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1111
<projectUrl>https://Boxstarter.org</projectUrl>
1212
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1313
<summary>Azure support for Boxstarter</summary>

BuildScripts/nuget/Boxstarter.Bootstrapper.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<owners>Matt Wrock, Rob Reynolds, Gary Ewan Park</owners>
88
<copyright>2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock</copyright>
99
<title>Boxstarter Bootstrapper Module</title>
10-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
10+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1111
<projectUrl>https://Boxstarter.org</projectUrl>
1212
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1313
<summary>Bootstrapper module for Boxstarter</summary>

BuildScripts/nuget/Boxstarter.Chocolatey.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<authors>Chocolatey Software, Inc</authors>
77
<owners>Matt Wrock, Rob Reynolds, Gary Ewan Park</owners>
88
<copyright>2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock</copyright>
9-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
9+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1010
<title>Boxstarter Chocolatey Module</title>
1111
<projectUrl>https://Boxstarter.org</projectUrl>
1212
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>

BuildScripts/nuget/Boxstarter.HyperV.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<owners>Matt Wrock, Rob Reynolds, Gary Ewan Park</owners>
88
<copyright>2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock</copyright>
99
<title>Boxstarter HyperV Module</title>
10-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
10+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1111
<projectUrl>https://Boxstarter.org</projectUrl>
1212
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1313
<summary>Hyper-V support for Boxstarter</summary>

BuildScripts/nuget/Boxstarter.TestRunner.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<owners>Matt Wrock, Rob Reynolds, Gary Ewan Park</owners>
88
<copyright>2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock</copyright>
99
<title>Boxstarter Test Runner Module</title>
10-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
10+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1111
<projectUrl>https://Boxstarter.org</projectUrl>
1212
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1313
<summary>Test runner module for Boxstarter</summary>

BuildScripts/nuget/Boxstarter.WinConfig.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1010
<id>Boxstarter.WinConfig</id>
1111
<title>Boxstarter WinConfig Module</title>
12-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
12+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1313
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1414
<summary>Windows environment module for Boxstarter</summary>
1515
<packageSourceUrl>https://github.com/chocolatey/boxstarter/</packageSourceUrl>

BuildScripts/nuget/Boxstarter.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<authors>Chocolatey Software, Inc</authors>
77
<owners>Matt Wrock, Rob Reynolds, Gary Ewan Park</owners>
88
<copyright>2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock</copyright>
9-
<iconUrl>https://cdn.rawgit.com/chocolatey/boxstarter/master/Web/Images/boxLogo_sm.png</iconUrl>
9+
<iconUrl>https://img.chocolatey.org/logos/boxstarter-logo.png</iconUrl>
1010
<title>Boxstarter</title>
1111
<projectUrl>https://Boxstarter.org</projectUrl>
1212
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ Enable-PSRemoting -Force
6262
* [Mailing List](https://groups.google.com/forum/#!forum/boxstarter)
6363
* [Twitter](https://twitter.com/chocolateynuget) / [Facebook](https://www.facebook.com/ChocolateySoftware) / [GitHub](https://github.com/chocolatey)
6464
* [Blog](https://chocolatey.org/blog) / [Newsletter](https://us8.list-manage.com/subscribe?u=86a6d80146a0da7f2223712e4&id=73b018498d)
65-
* [Documentation](https://boxstarter.org/WhyBoxstarter)
65+
* [Documentation](https://boxstarter.org/whyboxstarter)
6666
* [Community Chat](https://ch0.co/community)
6767

6868
### Documentation
6969

70-
Please see the [Boxstarter docs](https://boxstarter.org/WhyBoxstarter).
70+
Please see the [Boxstarter docs](https://boxstarter.org/whyboxstarter).
7171

7272
### Requirements
7373

tests/Chocolatey/Chocolatey.tests.ps1

+17
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,23 @@ Describe "Call-Chocolatey" {
412412
}
413413
}
414414

415+
context "when not verbose" {
416+
$script:passedArgs = ""
417+
Mock Invoke-LocalChocolatey { $script:passedArgs = $chocoArgs }
418+
$global:VerbosePreference="SilentlyContinue"
419+
choco Install pkg
420+
$global:VerbosePreference | Should Be "SilentlyContinue"
421+
422+
it "passes expected params" {
423+
$passedArgs.count | Should Be 5
424+
$passedArgs[0] | Should Be "Install"
425+
$passedArgs[1] | Should Be "pkg"
426+
$passedArgs[2] | Should Be "-Source"
427+
# $passedArgs[3] -> feeds, may differ from system to system
428+
$passedArgs[4] | Should Be "-y"
429+
}
430+
}
431+
415432
context "when verbose" {
416433
$script:passedArgs = ""
417434
Mock Invoke-LocalChocolatey { $script:passedArgs = $chocoArgs }

0 commit comments

Comments
 (0)