Skip to content

Commit

Permalink
Merge pull request #2482 from tunisiano187/patch-1
Browse files Browse the repository at this point in the history
(es) New regex
  • Loading branch information
TheCakeIsNaOH authored Jun 11, 2024
2 parents ff2610b + 9d41206 commit 0ad6706
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 3 additions & 2 deletions automatic/es/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Package can be verified like this:
1. Go to

x32: https://www.voidtools.com/ES-1.1.0.26.zip
x64:

to download the archive.

Expand All @@ -16,11 +17,11 @@ Package can be verified like this:
- Use Chocolatey utility 'checksum.exe'

checksum32: 978BB07DD5EA1868C716EE17B2F36BD4CBB1E2A4C2E1C439163558506492D873
checksum64:

Using Chocolatey AU:

Get-RemoteChecksum https://www.voidtools.com/ES-1.1.0.26.zip

File 'License.txt' is obtained from:
https://www.voidtools.com/License.txt

https://www.voidtools.com/License.txt
1 change: 1 addition & 0 deletions automatic/es/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $toolsDir = Split-Path $MyInvocation.MyCommand.Definition
$packageArgs = @{
packageName = 'es'
FileFullPath = "$toolsDir\ES-1.1.0.26.zip"
FileFullPath64 = "$toolsDir\ES-1.1.0.26.zip"
Destination = $toolsDir
}

Expand Down
16 changes: 11 additions & 5 deletions automatic/es/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ function global:au_SearchReplace {
".\tools\chocolateyInstall.ps1" = @{
"(?i)(^\s*packageName\s*=\s*)('.*')" = "`$1'$($Latest.PackageName)'"
"(?i)(^\s*FileFullPath\s*=\s*`"[$]toolsDir\\).*" = "`${1}$($Latest.FileName32)`""
"(?i)(^\s*FileFullPath64\s*=\s*`"[$]toolsDir\\).*" = "`${1}$($Latest.FileName64)`""
}

".\legal\VERIFICATION.txt" = @{
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(\s+x64:).*" = "`${1} $($Latest.URL64)"
"(?i)(checksum64:).*" = "`${1} $($Latest.Checksum64)"
"(?i)(Get-RemoteChecksum).*" = "`${1} $($Latest.URL32)"
}
}
Expand All @@ -22,15 +25,18 @@ function global:au_BeforeUpdate {
}

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$re = "ES-[\d\.]+\.zip"
$urlPath = $download_page.links | ? href -match $re | Select-Object -First 1 -Expand href
$version = ($urlPath -split '-' | Select-Object -Last 1).trim(".zip")
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$re = "ES-[\d\.]+\.x86.zip"
$urlPath = $download_page.links | ? href -match $re | Select-Object -First 1 -Expand href
$re64 = "ES-[\d\.]+\.x64.zip"
$urlPath64 = $download_page.links | ? href -match $re64 | Select-Object -First 1 -Expand href
$version = ($urlPath -split '-' | Select-Object -Last 1).trim(".x86.zip")
@{
Version = $version
URL32 = 'https://www.voidtools.com' + $urlPath
URL64 = 'https://www.voidtools.com' + $urlPath64
PackageName = 'es'
}
}

update -ChecksumFor none
update -ChecksumFor none

0 comments on commit 0ad6706

Please sign in to comment.