Skip to content

Commit d530606

Browse files
Merge pull request #1080 from GitGuardian/jgriffe/fix-choco-package
chore: fix chocolatey package to follow guidelines
2 parents 19be2b8 + f690341 commit d530606

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
VERIFICATION
2+
Verification is intended to assist the Chocolatey moderators and community
3+
in verifying that this package's contents are trustworthy.
4+
5+
1. Go to the releases page and download the windows package for the relevant version:
6+
https://github.com/GitGuardian/ggshield/releases
7+
8+
2. Extract the archive
9+
10+
3. Get the hashes from both the downloaded release and the choco package. The hashes should match.
11+
12+
To verify all files, you can use the following powershell script:
13+
14+
$folder1 = "C:\Absolute\Path\To\Folder1"
15+
$folder2 = "C:\Absolute\Path\To\Folder2"
16+
17+
$hashes1 = Get-ChildItem -Path $folder1 -Recurse -File | ForEach-Object {
18+
[PSCustomObject]@{
19+
RelativePath = $_.FullName.Substring($folder1.Length).TrimStart('\')
20+
Hash = (Get-FileHash $_.FullName).Hash
21+
}
22+
}
23+
24+
$hashes2 = Get-ChildItem -Path $folder2 -Recurse -File | ForEach-Object {
25+
[PSCustomObject]@{
26+
RelativePath = $_.FullName.Substring($folder2.Length).TrimStart('\')
27+
Hash = (Get-FileHash $_.FullName).Hash
28+
}
29+
}
30+
31+
Compare-Object -ReferenceObject $hashes1 -DifferenceObject $hashes2 -Property RelativePath, Hash

scripts/push-to-chocolatey/ggshield.nuspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<licenseUrl>https://raw.githubusercontent.com/GitGuardian/ggshield/refs/heads/main/LICENSE</licenseUrl>
1212
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1313
<projectSourceUrl>https://github.com/GitGuardian/ggshield</projectSourceUrl>
14+
<packageSourceUrl>https://github.com/GitGuardian/ggshield/tree/main/scripts/push-to-chocolatey</packageSourceUrl>
1415
<docsUrl>https://docs.gitguardian.com/ggshield-docs/getting-started</docsUrl>
1516
<tags>ggshield</tags>
1617
<summary>ggshield is a CLI application that helps you detect secrets.</summary>

scripts/push-to-chocolatey/push-to-chocolatey

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ mkdir ggshield-package/tools
2626
mv packages/*/_internal ggshield-package/tools
2727
mv packages/*/ggshield.exe ggshield-package/tools
2828
cp scripts/push-to-chocolatey/ggshield.nuspec ggshield-package
29+
cp scripts/push-to-chocolatey/VERIFICATION.txt ggshield-package
2930
sed -i "s/__VERSION__/$version/" ggshield-package/ggshield.nuspec
3031

3132
cd ggshield-package

0 commit comments

Comments
 (0)