@@ -90,8 +90,8 @@ if (-not $Licensed) {
90
90
}
91
91
Copy-Item $LicensePath $InstalledLicensePath - Force
92
92
}
93
- $ExtensionSource = if (Test-Path $PSScriptRoot \files \chocolatey.extension.* .nupkg) {
94
- Convert-Path $PSScriptRoot \files \
93
+ $ExtensionSource = if (Test-Path $PSScriptRoot \packages \chocolatey.extension.* .nupkg) {
94
+ Convert-Path $PSScriptRoot \packages \
95
95
} else {
96
96
' https://licensedpackages.chocolatey.org/api/v2/'
97
97
}
@@ -103,7 +103,7 @@ $PackageWorkingDirectory = Join-Path $WorkingDirectory "Packages"
103
103
if (-not (Test-Path $PackageWorkingDirectory )) {
104
104
$null = New-Item - Path $PackageWorkingDirectory - ItemType Directory - Force
105
105
}
106
- foreach ($Package in (Get-Content $PSScriptRoot \files \chocolatey.json | ConvertFrom-Json ).packages) {
106
+ foreach ($Package in (Get-Content $PSScriptRoot \packages \chocolatey.json | ConvertFrom-Json ).packages) {
107
107
$ChocoArgs = @ (
108
108
" download" , " $ ( $Package.Name ) "
109
109
" --output-directory" , $PackageWorkingDirectory
@@ -118,7 +118,7 @@ foreach ($Package in (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertF
118
118
}
119
119
120
120
try {
121
- if (-not (Get-ChocolateyPackageMetadata - Path $PackageWorkingDirectory - Id $Package.Name ) -and -not (Get-ChocolateyPackageMetadata - Path " $PSScriptRoot \files \" - Id $Package.Name )) {
121
+ if (-not (Get-ChocolateyPackageMetadata - Path $PackageWorkingDirectory - Id $Package.Name ) -and -not (Get-ChocolateyPackageMetadata - Path " $PSScriptRoot \packages \" - Id $Package.Name )) {
122
122
Write-Host " Downloading '$ ( $Package.Name ) '"
123
123
124
124
while ((Get-ChildItem $PackageWorkingDirectory - Filter * .nupkg).Where {$_.CreationTime -gt (Get-Date ).AddMinutes(-1 )}.Count -gt 5 ) {
@@ -132,18 +132,18 @@ foreach ($Package in (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertF
132
132
throw $_
133
133
}
134
134
}
135
- Move-Item - Path $PackageWorkingDirectory \* .nupkg - Destination $PSScriptRoot \files \
135
+ Move-Item - Path $PackageWorkingDirectory \* .nupkg - Destination $PSScriptRoot \packages \
136
136
137
137
# Jenkins Plugins
138
138
$PluginsWorkingDirectory = Join-Path $WorkingDirectory " JenkinsPlugins"
139
139
if (-not (Test-Path $PluginsWorkingDirectory )) {
140
140
$null = New-Item - Path $PluginsWorkingDirectory - ItemType Directory - Force
141
141
}
142
- if (Test-Path $PSScriptRoot \files \JenkinsPlugins.zip) {
143
- Expand-Archive - Path $PSScriptRoot \files \JenkinsPlugins.zip - DestinationPath $PluginsWorkingDirectory - Force
142
+ if (Test-Path $PSScriptRoot \packages \JenkinsPlugins.zip) {
143
+ Expand-Archive - Path $PSScriptRoot \packages \JenkinsPlugins.zip - DestinationPath $PluginsWorkingDirectory - Force
144
144
}
145
145
$ProgressPreference = " Ignore"
146
- foreach ($Plugin in (Get-Content $PSScriptRoot \files \jenkins.json | ConvertFrom-Json ).plugins) {
146
+ foreach ($Plugin in (Get-Content $PSScriptRoot \packages \jenkins.json | ConvertFrom-Json ).plugins) {
147
147
$RestArgs = @ {
148
148
Uri = " https://updates.jenkins-ci.org/latest/$ ( $Plugin.Name ) .hpi"
149
149
OutFile = Join-Path $PluginsWorkingDirectory " $ ( $Plugin.Name ) .hpi"
@@ -155,12 +155,12 @@ foreach ($Plugin in (Get-Content $PSScriptRoot\files\jenkins.json | ConvertFrom-
155
155
Invoke-WebRequest @RestArgs - UseBasicParsing
156
156
}
157
157
}
158
- Compress-Archive - Path $PluginsWorkingDirectory \* - Destination $PSScriptRoot \files \JenkinsPlugins.zip - Force
158
+ Compress-Archive - Path $PluginsWorkingDirectory \* - Destination $PSScriptRoot \packages \JenkinsPlugins.zip - Force
159
159
160
160
# BCryptDll
161
161
$null = Get-BcryptDll
162
162
163
163
# License
164
- if ($LicensePath -ne " $PSScriptRoot \files \chocolatey.license.xml" ) {
165
- Copy-Item - Path (Convert-Path $LicensePath ) - Destination $PSScriptRoot \files \chocolatey.license.xml
164
+ if ($LicensePath -ne " $PSScriptRoot \packages \chocolatey.license.xml" ) {
165
+ Copy-Item - Path (Convert-Path $LicensePath ) - Destination $PSScriptRoot \packages \chocolatey.license.xml
166
166
}
0 commit comments