Skip to content

Commit

Permalink
(chocolatey-community#2187) Fix pencil pkg auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
Windos authored and pauby committed Mar 10, 2024
1 parent 9c891a6 commit 2d4adc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
7 changes: 2 additions & 5 deletions automatic/pencil/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ and can be verified by doing the following:

3. The checksums should match the following:

checksum32 type: sha256
checksum32: 7788A1EBC5195BDA109BB7B29630C740D887FD24D4F153C54D6F7E25BFF6795F

checksum64 type: sha256
checksum64: 0762EE37817F748C43F5E913B2778712B2BA33241253718876620658DF98BCD9
checksum type: sha256
checksum: 7788A1EBC5195BDA109BB7B29630C740D887FD24D4F153C54D6F7E25BFF6795F

The file 'LICENSE.md' has been obtained from <https://github.com/evolus/pencil/blob/634622963ba4098f97c1cc7e7eabdd482bb1dcc9/LICENSE.md>
3 changes: 1 addition & 2 deletions automatic/pencil/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ $toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$packageArgs = @{
packageName = $Env:ChocolateyPackageName
fileType = 'exe'
file = Get-Item $toolsPath\*-i386.exe
file64 = Get-Item $toolsPath\*_64.exe
file = Get-Item $toolsPath\Pencil-*.exe
silentArgs = '/S'
validExitCodes = @(0)
softwareName = 'Pencil*'
Expand Down
11 changes: 4 additions & 7 deletions automatic/pencil/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ function global:au_SearchReplace {
".\legal\VERIFICATION.txt" = @{
"(?i)(^\s*location on\:?\s*)\<.*\>" = "`${1}<$($Latest.ReleaseURL)>"
"(?i)(^\s*software.*)\<.*\>" = "`${1}<$($Latest.URL32)>"
"(?i)(^\s*checksum32\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum64\s*type\:).*" = "`${1} $($Latest.ChecksumType64)"
"(?i)(^\s*checksum32\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum\:).*" = "`${1} $($Latest.Checksum32)"
}

"$($Latest.PackageName).nuspec" = @{
Expand All @@ -31,13 +29,12 @@ function global:au_GetLatest {
$re = '\.exe$'
$url = $download_page.links | ? href -match $re | % { $domain + $_.href }

$version = $url[0] -split '/' | select -last 1 -Skip 1
$version = $url -split '/' | select -last 1 -Skip 1
$version = $version.Substring(1) -replace '\.\w+$'

@{
Version = $version
URL32 = $url -match 'i386' | select -first 1
URL64 = $url -notmatch 'i386' | select -first 1
Url32 = $url
ReleaseURL = $download_page.links.href | ? { $_ -like "*github*/release/*"} | select -first 1
}
}
Expand Down

0 comments on commit 2d4adc5

Please sign in to comment.