3 Achegas 18f7aa0ae0 ... 1b60e728fe

Autor SHA1 Mensaxe Data
  Chocolatey 1b60e728fe AU: 1 updated - aws-iam-authenticator hai 2 meses
  Douglas Thrift 0f87d74d01 Fix property name to DownloadURL hai 2 meses
  Douglas Thrift ec65c878f8 Use Latest Release on GitHub Helper for checking for updates of AWS IAM Authenticator hai 2 meses

+ 2 - 0
.github/workflows/au.yml

@@ -34,6 +34,8 @@ jobs:
         run: |
           git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
           . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
+      - name: Install Latest Release on GitHub Helper
+        run: choco install largh --yes
       - name: Check update for packages
         run: |
           $ErrorActionPreference = 'Continue'

+ 1 - 1
automatic/aws-iam-authenticator/aws-iam-authenticator.nuspec

@@ -3,7 +3,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
   <metadata>
     <id>aws-iam-authenticator</id>
-    <version>0.5.9</version>
+    <version>0.6.27</version>
     <packageSourceUrl>https://github.com/douglaswth/chocolatey-packages/tree/master/automatic/aws-iam-authenticator</packageSourceUrl>
     <owners>Douglas Thrift</owners>
     <title>AWS IAM Authenticator for Kubernetes</title>

+ 2 - 2
automatic/aws-iam-authenticator/tools/chocolateyinstall.ps1

@@ -5,8 +5,8 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
 $packageArgs = @{
   packageName    = $env:ChocolateyPackageName
   fileFullPath   = "$toolsDir\aws-iam-authenticator.exe"
-  url64bit       = 'https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_windows_amd64.exe'
-  checksum64     = 'b7345e06c5f1d31b9459a38baffe0744343711cb5042cb31ff1e072d870c42f9'
+  url64bit       = 'https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.6.27/aws-iam-authenticator_0.6.27_windows_amd64.exe'
+  checksum64     = '6ce12a69d0270d3ec97fcfc21caccd671b633ff51a31f41b0340dbe1c48bcba7'
   checksumType64 = 'sha256'
 }
 

+ 4 - 5
automatic/aws-iam-authenticator/update.ps1

@@ -1,12 +1,11 @@
 Import-Module au
 
-$latest_release = 'https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/latest'
+$repo = 'https://github.com/kubernetes-sigs/aws-iam-authenticator'
 
 function global:au_GetLatest {
-  $download_page = Invoke-WebRequest -Uri $latest_release -UseBasicParsing
-  $regex = '^.+/aws-iam-authenticator_(\d+\.\d+\.\d+)_windows_amd64\.exe$'
-  $url64 = "https://github.com$($download_page.Links | Where-Object href -Match $regex | Select-Object -First 1 -ExpandProperty href)"
-  $version = $url64 -replace $regex, '$1'
+  $release = Get-LatestReleaseOnGitHub -URL $repo -AccessToken $env:github_api_key
+  $version = $release.Tag.trim('v.')
+  $url64 = $release.Assets | Where-Object { $_.FileName -like '*_windows_amd64.exe' } | Select-Object -First 1 -ExpandProperty DownloadURL
   return @{ Version = $version; URL64 = $url64 }
 }