Skip to content

Commit

Permalink
Pin Nexus-Repository to mitigate upgrade issues
Browse files Browse the repository at this point in the history
The latest version of Nexus-Repository needs special handling for upgrades, and breaks some NuGet v2 behaviour.

Until we have this sorted, we're pinning to the previous version.
  • Loading branch information
JPRuskin committed Aug 12, 2024
1 parent 19bf837 commit b64e349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Start-C4bNexusSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ process {
# Dot-source helper functions
. .\scripts\Get-Helpers.ps1

$Packages = (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertFrom-Json).packages

# Install base nexus-repository package
Write-Host "Installing Sonatype Nexus Repository"
$chocoArgs = @('install', 'nexus-repository', '-y' ,'--no-progress', "--package-parameters='/Fqdn:localhost'")
$chocoArgs = @('install', 'nexus-repository', "--version=$($Packages.Where{$_.Name -eq 'nexus-repository'}.Version)", '--pin', '-y' ,'--no-progress', "--package-parameters='/Fqdn:localhost'")
& choco @chocoArgs

#Build Credential Object, Connect to Nexus
Expand Down
2 changes: 1 addition & 1 deletion files/chocolatey.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{ "name": "KB3035131", "internalize": false },
{ "name": "KB3063858", "internalize": false },
{ "name": "microsoft-edge" },
{ "name": "nexus-repository" },
{ "name": "nexus-repository", "version": "3.70.1.2" },
{ "name": "sql-server-express" },
{ "name": "temurin21jre" },
{ "name": "vcredist140" }
Expand Down

0 comments on commit b64e349

Please sign in to comment.