diff --git a/automatic/nexus-repository/update.ps1 b/automatic/nexus-repository/_update.ps1 similarity index 93% rename from automatic/nexus-repository/update.ps1 rename to automatic/nexus-repository/_update.ps1 index 548ed8073b73..0bee8ddd35b8 100644 --- a/automatic/nexus-repository/update.ps1 +++ b/automatic/nexus-repository/_update.ps1 @@ -1,24 +1,24 @@ -Import-Module Chocolatey-AU - -function global:au_GetLatest { - $LatestRelease = Get-GitHubRelease sonatype nexus-public - $ReleaseVersion = $LatestRelease.tag_name -replace 'release-', '' - - @{ - NexusVersion = $ReleaseVersion - Version = $ReleaseVersion -replace '-', '.' - URL64 = "https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-$($ReleaseVersion)-win64.zip" - } -} - -function global:au_SearchReplace { - @{ - ".\tools\chocolateyInstall.ps1" = @{ - "(^[$]Version\s*=\s*)('.*')" = "`$1'$($Latest.NexusVersion)'" - "(^\s*url64\s*=\s*)('.*')" = "`$1'$($Latest.URL64)'" - "(^\s*checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'" - } - } -} - -update -ChecksumFor 64 +Import-Module Chocolatey-AU + +function global:au_GetLatest { + $LatestRelease = Get-GitHubRelease sonatype nexus-public + $ReleaseVersion = $LatestRelease.tag_name -replace 'release-', '' + + @{ + NexusVersion = $ReleaseVersion + Version = $ReleaseVersion -replace '-', '.' + URL64 = "https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-$($ReleaseVersion)-win64.zip" + } +} + +function global:au_SearchReplace { + @{ + ".\tools\chocolateyInstall.ps1" = @{ + "(^[$]Version\s*=\s*)('.*')" = "`$1'$($Latest.NexusVersion)'" + "(^\s*url64\s*=\s*)('.*')" = "`$1'$($Latest.URL64)'" + "(^\s*checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'" + } + } +} + +update -ChecksumFor 64