Skip to content

Commit

Permalink
First Test
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Sep 28, 2024
1 parent ac85e2c commit 6a8803c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions automatic/metafox/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

1. Download the installer:

url: https://sourceforge.net/projects/freeplane/files/freeplane%20stable/Freeplane-Setup-with-Java-1.12.5.exe/download

2. You can use one of the following methods to obtain the checksum:
- Use powershell function 'Get-FileHash'
- Use Chocolatey utility 'checksum.exe'
- Using AU:
Get-RemoteChecksum https://sourceforge.net/projects/freeplane/files/freeplane%20stable/Freeplane-Setup-with-Java-1.12.5.exe/download

3. Compare to Checksum:

checksum32: d214c610141466289b5bd717447626c706bab9aebb4fc86b6091f26ae5335523
unzipped: d214c610141466289b5bd717447626c706bab9aebb4fc86b6091f26ae5335523
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import-module au

function global:au_SearchReplace {
@{
'tools/chocolateyInstall.ps1' = @{
"(^[$]url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'"
"(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
"(^[$]checksumtype\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
'.\legal\VERIFICATION.txt' = @{
"(?i)(\s+url:).*" = "`${1} $($Latest.URL32)"
"(?i)(Get-RemoteChecksum).*" = "`${1} $($Latest.URL32)"
"(?i)(\s+checksum:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(\s+unzipped:).*" = "`${1} $($Latest.Unzipped)"
}
}
}
Expand All @@ -16,6 +17,7 @@ function global:au_BeforeUpdate {
$FileVersion = Get-FileVersion $Latest.URL32
Expand-Archive -Path $FileVersion.TempFile -DestinationPath "tools/"
Move-Item -Path $Latest.TempFile -Destination 'tools\MetaFox.exe'
$Latest.Unzipped = Get-FileHash -Path 'tools\MetaFox.exe' -Algorithm $FileVersion.checksumType
$Latest.Checksum32 = $FileVersion.Checksum
$Latest.ChecksumType32 = $FileVersion.checksumType
}
Expand Down

0 comments on commit 6a8803c

Please sign in to comment.