Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Formula/paranoid-passwd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
class ParanoidPasswd < Formula
desc "Local-first password manager and generator with CLI and TUI"
homepage "https://github.com/jbcom/paranoid-passwd"
version "3.6.5"
version "3.7.0"
license "GPL-3.0-only"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-darwin-arm64.tar.gz"
sha256 "6d31f82ef205a6a59be1003768bbcf73953c1a63406282416538ea4da017a522"
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-darwin-arm64.tar.gz"
sha256 "cf0a59c1538c0acd08814424c31fa259383d0f6cfc51fc6d897559859d7b576c"
end
if Hardware::CPU.intel?
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-darwin-amd64.tar.gz"
sha256 "97e18ccf54d3d7fa645e3942181bdea1de2d5911c9c63bdd9d29aaab96121498"
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-darwin-amd64.tar.gz"
sha256 "f542f119507ec1acb2b8b5765dc299c5520c2579297a5216ed73208f2ed5e2d2"
end
end

on_linux do
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-linux-arm64.tar.gz"
sha256 "dca563f1c336e2613fe0f65d073e856dbf7d748a312a421f4bc192d6f84b9ea4"
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-linux-arm64.tar.gz"
sha256 "867915fd82bfa60ebbebc20687800efa846870aa3b2c5abb4e36a58ee6d0192c"
end
if Hardware::CPU.intel?
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-linux-amd64.tar.gz"
sha256 "cd232e5d4076ae67a575ce7c777abf2733abc477f7642e66894740f246d84cd9"
url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-linux-amd64.tar.gz"
sha256 "849ac961091dd3140e2024e9b12fad4ab3228ba7bb8b9841cac4b3e0c199ddf2"
end
end
Comment on lines 12 to 32
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability and to reduce redundancy, you can use the version variable (defined on line 9) within the url strings. This way, you only need to update the version number in one place when a new release is out (the checksums will still need updating).

Even though this file is auto-generated, this is a good practice to incorporate into the generation script.

  on_macos do
    if Hardware::CPU.arm?
      url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v#{version}/paranoid-passwd-#{version}-darwin-arm64.tar.gz"
      sha256 "cf0a59c1538c0acd08814424c31fa259383d0f6cfc51fc6d897559859d7b576c"
    end
    if Hardware::CPU.intel?
      url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v#{version}/paranoid-passwd-#{version}-darwin-amd64.tar.gz"
      sha256 "f542f119507ec1acb2b8b5765dc299c5520c2579297a5216ed73208f2ed5e2d2"
    end
  end

  on_linux do
    if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
      url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v#{version}/paranoid-passwd-#{version}-linux-arm64.tar.gz"
      sha256 "867915fd82bfa60ebbebc20687800efa846870aa3b2c5abb4e36a58ee6d0192c"
    end
    if Hardware::CPU.intel?
      url "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v#{version}/paranoid-passwd-#{version}-linux-amd64.tar.gz"
      sha256 "849ac961091dd3140e2024e9b12fad4ab3228ba7bb8b9841cac4b3e0c199ddf2"
    end
  end


Expand Down
10 changes: 5 additions & 5 deletions bucket/paranoid-passwd.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "3.6.5",
"version": "3.7.0",
"description": "Local-first password manager and generator with CLI and TUI",
"homepage": "https://github.com/jbcom/paranoid-passwd",
"license": "GPL-3.0-only",
"url": "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-windows-amd64.zip",
"hash": "a585b2660d0e09b9edb4a8de27a3021b663b49e9e0717b90f56996d9df3b4d0d",
"url": "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-windows-amd64.zip",
"hash": "fae9ae7906ab4b6e33c03c5cb93686f9d1b3a673e9085e3274ea296ac80d2298",
Comment on lines +6 to +7
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The top-level url and hash fields are redundant as they are already specified within the architecture block for 64bit. To simplify the manifest and avoid duplication, you can remove these top-level fields.

"bin": "paranoid-passwd.exe",
"architecture": {
"64bit": {
"url": "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-windows-amd64.zip",
"hash": "a585b2660d0e09b9edb4a8de27a3021b663b49e9e0717b90f56996d9df3b4d0d"
"url": "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-windows-amd64.zip",
"hash": "fae9ae7906ab4b6e33c03c5cb93686f9d1b3a673e9085e3274ea296ac80d2298"
}
},
"checkver": {
Expand Down
4 changes: 2 additions & 2 deletions choco/paranoid-passwd/paranoid-passwd.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>paranoid-passwd</id>
<version>3.6.5</version>
<version>3.7.0</version>
<title>Paranoid Passwd</title>
<authors>Jon B</authors>
<owners>jbcom</owners>
Expand All @@ -21,7 +21,7 @@ TUI, scriptable CLI, and release artifacts with checksums and
attestations.
</description>
<tags>password security cli tui rust paranoid</tags>
<releaseNotes>https://github.com/jbcom/paranoid-passwd/releases/tag/paranoid-passwd-v3.6.5</releaseNotes>
<releaseNotes>https://github.com/jbcom/paranoid-passwd/releases/tag/paranoid-passwd-v3.7.0</releaseNotes>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid hardcoding the version in multiple places, you can use the $version$ replacement token in the releaseNotes URL. This token will be automatically replaced with the value from the <version> tag when the package is built.

    <releaseNotes>https://github.com/jbcom/paranoid-passwd/releases/tag/paranoid-passwd-v$version$</releaseNotes>

</metadata>
<files>
<file src="tools/**" target="tools" />
Expand Down
10 changes: 5 additions & 5 deletions choco/paranoid-passwd/tools/VERIFICATION.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
VERIFICATION

paranoid-passwd 3.6.5 for Windows amd64 ships as a ZIP archive at:
https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-windows-amd64.zip
paranoid-passwd 3.7.0 for Windows amd64 ships as a ZIP archive at:
https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-windows-amd64.zip

Checksum (SHA-256): a585b2660d0e09b9edb4a8de27a3021b663b49e9e0717b90f56996d9df3b4d0d
Checksum (SHA-256): fae9ae7906ab4b6e33c03c5cb93686f9d1b3a673e9085e3274ea296ac80d2298

Verify locally on Windows:

Get-FileHash paranoid-passwd-3.6.5-windows-amd64.zip -Algorithm SHA256
Get-FileHash paranoid-passwd-3.7.0-windows-amd64.zip -Algorithm SHA256

Also verify sigstore build provenance:

gh attestation verify paranoid-passwd-3.6.5-windows-amd64.zip --owner jbcom
gh attestation verify paranoid-passwd-3.7.0-windows-amd64.zip --owner jbcom

Source: https://github.com/jbcom/paranoid-passwd
4 changes: 2 additions & 2 deletions choco/paranoid-passwd/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$ErrorActionPreference = 'Stop'
$packageName = 'paranoid-passwd'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url64 = 'https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.6.5/paranoid-passwd-3.6.5-windows-amd64.zip'
$checksum64 = 'a585b2660d0e09b9edb4a8de27a3021b663b49e9e0717b90f56996d9df3b4d0d'
$url64 = 'https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v3.7.0/paranoid-passwd-3.7.0-windows-amd64.zip'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability, you can construct the download URL dynamically using the $env:ChocolateyPackageVersion environment variable, which Chocolatey sets based on the version in the .nuspec file. This removes the need to update the version number in the URL string manually for each release.

$url64        = "https://github.com/jbcom/paranoid-passwd/releases/download/paranoid-passwd-v$($env:ChocolateyPackageVersion)/paranoid-passwd-$($env:ChocolateyPackageVersion)-windows-amd64.zip"

$checksum64 = 'fae9ae7906ab4b6e33c03c5cb93686f9d1b3a673e9085e3274ea296ac80d2298'

$packageArgs = @{
packageName = $packageName
Expand Down
Loading