Browse Source

Fix Auto Update for BlueBrick

Douglas Thrift 3 years ago
parent
commit
5bcf1d6d85
2 changed files with 4 additions and 12 deletions
  1. 3 11
      automatic/bluebrick/tools/chocolateyinstall.ps1
  2. 1 1
      automatic/bluebrick/update.ps1

+ 3 - 11
automatic/bluebrick/tools/chocolateyinstall.ps1

@@ -1,27 +1,19 @@
 $ErrorActionPreference = 'Stop';
 
-$packageName  = $env:ChocolateyPackageName
-$toolsDir     = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
+$packageName = $env:ChocolateyPackageName
+$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
 $blueBrickExe = Join-Path $toolsDir 'BlueBrick.exe'
 $blueBrickLnk = Join-Path ([System.Environment]::GetFolderPath('CommonPrograms')) 'BlueBrick.lnk'
 
 $packageArgs = @{
   packageName   = $packageName
   unzipLocation = $toolsDir
-  url           = 'https://bluebrick.lswproject.com/download/BlueBrick1.8.2.zip'        # BlueBrick
+  url           = 'https://bluebrick.lswproject.com/download/BlueBrick1.8.2.zip'       # BlueBrick
   checksum      = '37645dc4fe22193843b8b662eda983192eaf92b88f5cf0b9542311bbc0857ae7'    # BlueBrick
   checksumType  = 'sha256'                                                              # BlueBrick
 }
-$partsPackageArgs = @{
-  packageName   = $packageName
-  unzipLocation = $toolsDir
-  url           = 'https://bluebrick.lswproject.com/download/AllAdditionalParts.zip'
-  checksum      = 'f728151147d8c862ce88e50f1bf9cb2b748734f52417be8bb9c11fdf60f2150b'
-  checksumType  = 'sha256'
-}
 
 Install-ChocolateyZipPackage @packageArgs
-Install-ChocolateyZipPackage @partsPackageArgs
 Install-ChocolateyShortcut `
   -ShortcutFilePath $blueBrickLnk `
   -TargetPath $blueBrickExe `

+ 1 - 1
automatic/bluebrick/update.ps1

@@ -4,7 +4,7 @@ $latest_release = 'https://bluebrick.lswproject.com/download.html'
 
 function global:au_GetLatest {
     $download_page = Invoke-WebRequest -Uri $latest_release
-    $regex = '^.+/BlueBrick(\d+\.\d+\.\d+)\.zip$'
+    $regex = '^.+/BlueBrick\.(\d+\.\d+\.\d+)\.zip$'
     $url = $download_page.Links | Where-Object href -Match $regex | Select-Object -First 1 -ExpandProperty href
     $url = [System.Uri]::new([System.Uri]$latest_release, $url).AbsoluteUri
     $version = $url -replace $regex, '$1'