@@ -90,8 +90,8 @@ if (-not $Licensed) {
9090 }
9191 Copy-Item $LicensePath $InstalledLicensePath - Force
9292 }
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 \
9595 } else {
9696 ' https://licensedpackages.chocolatey.org/api/v2/'
9797 }
@@ -103,7 +103,7 @@ $PackageWorkingDirectory = Join-Path $WorkingDirectory "Packages"
103103if (-not (Test-Path $PackageWorkingDirectory )) {
104104 $null = New-Item - Path $PackageWorkingDirectory - ItemType Directory - Force
105105}
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) {
107107 $ChocoArgs = @ (
108108 " download" , " $ ( $Package.Name ) "
109109 " --output-directory" , $PackageWorkingDirectory
@@ -118,7 +118,7 @@ foreach ($Package in (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertF
118118 }
119119
120120 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 )) {
122122 Write-Host " Downloading '$ ( $Package.Name ) '"
123123
124124 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
132132 throw $_
133133 }
134134}
135- Move-Item - Path $PackageWorkingDirectory \* .nupkg - Destination $PSScriptRoot \files \
135+ Move-Item - Path $PackageWorkingDirectory \* .nupkg - Destination $PSScriptRoot \packages \
136136
137137# Jenkins Plugins
138138$PluginsWorkingDirectory = Join-Path $WorkingDirectory " JenkinsPlugins"
139139if (-not (Test-Path $PluginsWorkingDirectory )) {
140140 $null = New-Item - Path $PluginsWorkingDirectory - ItemType Directory - Force
141141}
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
144144}
145145$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) {
147147 $RestArgs = @ {
148148 Uri = " https://updates.jenkins-ci.org/latest/$ ( $Plugin.Name ) .hpi"
149149 OutFile = Join-Path $PluginsWorkingDirectory " $ ( $Plugin.Name ) .hpi"
@@ -155,12 +155,12 @@ foreach ($Plugin in (Get-Content $PSScriptRoot\files\jenkins.json | ConvertFrom-
155155 Invoke-WebRequest @RestArgs - UseBasicParsing
156156 }
157157}
158- Compress-Archive - Path $PluginsWorkingDirectory \* - Destination $PSScriptRoot \files \JenkinsPlugins.zip - Force
158+ Compress-Archive - Path $PluginsWorkingDirectory \* - Destination $PSScriptRoot \packages \JenkinsPlugins.zip - Force
159159
160160# BCryptDll
161161$null = Get-BcryptDll
162162
163163# 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
166166}
0 commit comments