From 3fd0cc1c02e2ac80f40afe201c9b6e2ccd0e6259 Mon Sep 17 00:00:00 2001 From: C85297 <95289555+C85297@users.noreply.github.com> Date: Mon, 27 Apr 2026 13:05:44 +0100 Subject: [PATCH 1/2] Fix #2081 - include ref in release zip --- Gruntfile.js | 8 +++++--- src/web/html/index.html | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a67aa5b855..ea64436cb6 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -89,6 +89,7 @@ module.exports = function (grunt) { const compileYear = grunt.template.today("UTC:yyyy"), compileTime = grunt.template.today("UTC:dd/mm/yyyy HH:MM:ss") + " UTC", pkg = grunt.file.readJSON("package.json"), + downloadZipFilename = `CyberChef_${process.env.GITHUB_SHA || `v${pkg.version}`}.zip`, webpackConfig = require("./webpack.config.js"), BUILD_CONSTANTS = { COMPILE_YEAR: JSON.stringify(compileYear), @@ -130,6 +131,7 @@ module.exports = function (grunt) { compileYear: compileYear, compileTime: compileTime, version: pkg.version, + downloadZipFilename: downloadZipFilename, minify: { removeComments: true, collapseWhitespace: true, @@ -245,7 +247,7 @@ module.exports = function (grunt) { "!build/prod/index.html", "!build/prod/BundleAnalyzerReport.html", ], - dest: `build/prod/CyberChef_v${pkg.version}.zip` + dest: `build/prod/${downloadZipFilename}` } }, connect: { @@ -333,12 +335,12 @@ module.exports = function (grunt) { switch (process.platform) { case "darwin": return chainCommands([ - `shasum -a 256 build/prod/CyberChef_v${pkg.version}.zip | awk '{print $1;}' > build/prod/sha256digest.txt`, + `shasum -a 256 build/prod/${downloadZipFilename} | awk '{print $1;}' > build/prod/sha256digest.txt`, `sed -i '' -e "s/DOWNLOAD_HASH_PLACEHOLDER/$(cat build/prod/sha256digest.txt)/" build/prod/index.html` ]); default: return chainCommands([ - `sha256sum build/prod/CyberChef_v${pkg.version}.zip | awk '{print $1;}' > build/prod/sha256digest.txt`, + `sha256sum build/prod/${downloadZipFilename} | awk '{print $1;}' > build/prod/sha256digest.txt`, `sed -i -e "s/DOWNLOAD_HASH_PLACEHOLDER/$(cat build/prod/sha256digest.txt)/" build/prod/index.html` ]); } diff --git a/src/web/html/index.html b/src/web/html/index.html index 2d4de4bd73..531d6539c2 100755 --- a/src/web/html/index.html +++ b/src/web/html/index.html @@ -876,7 +876,7 @@