From 4ba9fbc2221efcfd0841d25fbbe41d34280b56fa Mon Sep 17 00:00:00 2001 From: Roland Rodriguez Date: Thu, 25 Jul 2024 05:50:54 -0600 Subject: [PATCH] feat: Update paseto_cli version to 1.0.0-alpha.23 and refine platform-specific package name determination in install.js --- Cargo.lock | 2 +- Cargo.toml | 2 +- install.js | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b6f32b..8417436 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -439,7 +439,7 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "paseto_cli" -version = "1.0.0-alpha.22" +version = "1.0.0-alpha.23" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index d4f498e..b07bb8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "paseto_cli" -version = "1.0.0-alpha.22" +version = "1.0.0-alpha.23" edition = "2021" description = "A command-line tool for generating and validating PASETO v4.local tokens" authors = ["Roland Rodriguez "] diff --git a/install.js b/install.js index 8e016b8..def1057 100644 --- a/install.js +++ b/install.js @@ -16,11 +16,10 @@ const BINARY_DISTRIBUTION_PACKAGES = { const BINARY_DISTRIBUTION_VERSION = process.env.BINARY_DISTRIBUTION_VERSION || '1.0.0-alpha.2'; // Default to a version if not set // Windows binaries end with .exe so we need to special case them. -const binaryName = process.platform === "win32" ? "paseto_cli.exe" : "paseto_cli"; +const binaryName = process.platform === 'win32' ? 'paseto_cli.exe' : 'paseto_cli'; // Determine package name for this platform -const platformSpecificPackageName = - BINARY_DISTRIBUTION_PACKAGES[process.platform]; +const platformSpecificPackageName = BINARY_DISTRIBUTION_PACKAGES[`${process.platform}-${process.arch}`]; // Compute the path we want to emit the fallback binary to const fallbackBinaryPath = path.join(__dirname, binaryName);