@@ -35,19 +35,17 @@ param(
35
35
)
36
36
37
37
begin {
38
- if ($host.name -ne ' ConsoleHost' ) {
38
+ if ($host.name -ne ' ConsoleHost' ) {
39
39
Write-Warning " This script cannot be ran from within PowerShell ISE"
40
40
Write-Warning " Please launch powershell.exe as an administrator, and run this script again"
41
41
break
42
42
}
43
43
44
- if ($env: CHOCO_QSG_DEVELOP ) {
44
+ if ($env: CHOCO_QSG_DEVELOP ){
45
45
$QsRepo = " https://github.com/chocolatey/choco-quickstart-scripts/archive/refs/heads/develop.zip"
46
- $branchName = ' develop'
47
46
}
48
47
else {
49
48
$QsRepo = " https://github.com/chocolatey/choco-quickstart-scripts/archive/main.zip"
50
- $branchName = ' main'
51
49
}
52
50
}
53
51
@@ -140,18 +138,17 @@ process {
140
138
$PkgsDir = " $ChocoPath \packages"
141
139
$TempDir = " $ChocoPath \temp"
142
140
$TestDir = " $ChocoPath \tests"
143
- @ ($ChocoPath , $FilesDir , $PkgsDir , $TempDir , $TestDir ) |
141
+ @ ($ChocoPath , $FilesDir , $PkgsDir , $TempDir , $TestDir ) |
144
142
Foreach-Object {
145
143
$null = New-Item - Path $_ - ItemType Directory - Force
146
144
}
147
145
148
146
# Download and extract C4B setup files from repo
149
-
150
- Invoke-WebRequest - Uri $QsRepo - UseBasicParsing - OutFile " $TempDir \$branchName .zip"
151
- Expand-Archive " $TempDir \$branchName .zip" $TempDir
152
- Copy-Item " $TempDir \choco-quickstart-scripts-$branchName \*" $FilesDir - Recurse
147
+ Invoke-WebRequest - Uri $QsRepo - UseBasicParsing - OutFile " $TempDir \main.zip"
148
+ Expand-Archive " $TempDir \main.zip" $TempDir
149
+ Copy-Item " $TempDir \choco-quickstart-scripts-main\*" $FilesDir - Recurse
153
150
Remove-Item " $TempDir " - Recurse - Force
154
-
151
+
155
152
# Convert license to a "choco-license" package, and install it locally to test
156
153
Write-Host " Creating a " chocolatey- license" package, and testing install." - ForegroundColor Green
157
154
Set-Location $FilesDir
0 commit comments