Skip to content

Commit

Permalink
(rundeck) deembed package as it got too big
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor committed Apr 19, 2022
1 parent 1a30f18 commit 78eb74b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 6 additions & 5 deletions rundeck/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = 'Stop'

$toolsDir = Split-Path $MyInvocation.MyCommand.Definition
. $toolsDir\helpers.ps1

Update-SessionEnvironment # Java might have been installed as dependency

$pp = Get-PackageParameters
$pp = Get-PackageParameters rundeck
if (!$pp.InstallDir) { $pp.InstallDir = 'C:\rundeck' }

Write-Host "Installing to" $pp.InstallDir
mkdir $pp.InstallDir -ea 0 | Out-Null

$url = 'https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/rundeck-4.0.1-20220404.war/artifacts/rundeck-4.0.1-20220404.war/download'
Get-ChocolateyWebFile rundeck "$($pp.InstallDir)\rundeck.war" $url

Write-Host "Setting up machine environment variable RDECK_BASE"
Install-ChocolateyEnvironmentVariable 'RDECK_BASE' $pp.InstallDir 'Machine'

Write-Host "Copying files"
mv -Force $toolsDir\*.war "$($pp.InstallDir)\rundeck.war"
mv -Force $toolsDir\start_rundeck.bat $pp.InstallDir
cd $pp.InstallDir

Expand All @@ -26,4 +27,4 @@ if ($pp.AdminPwd) { Set-RundeckAdminPass }
if ($pp.DateFormat) { Set-RundeckDateFormat }
if ($pp.TokenDuration) { Set-RundeckTokenDuration }
if ($pp.EnableSsl) { Enable-RundeckSsl }
if ($pp.ContainsKey('Service')) { Install-RundeckService }
if ($pp.ContainsKey('Service')) { Install-RundeckService }
6 changes: 5 additions & 1 deletion rundeck/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ function global:au_SearchReplace {
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)"
}

".\tools\chocolateyInstall.ps1" = @{
"(?i)([$]url\s*=\s*').*'" = "`${1}$($Latest.URL32)'"
}
}
}

function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix -FileNameBase "rundeck-$($Latest.Version)" }
function global:au_BeforeUpdate { $Latest.Checksum32 = Get-RemoteChecksum $Latest.URL32 }

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
Expand Down

0 comments on commit 78eb74b

Please sign in to comment.