Version string uses sha

This commit is contained in:
C85297 2026-04-27 14:19:06 +01:00
parent 3fd0cc1c02
commit 549f24eb0a
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View File

@ -89,7 +89,8 @@ module.exports = function (grunt) {
const compileYear = grunt.template.today("UTC:yyyy"), const compileYear = grunt.template.today("UTC:yyyy"),
compileTime = grunt.template.today("UTC:dd/mm/yyyy HH:MM:ss") + " UTC", compileTime = grunt.template.today("UTC:dd/mm/yyyy HH:MM:ss") + " UTC",
pkg = grunt.file.readJSON("package.json"), pkg = grunt.file.readJSON("package.json"),
downloadZipFilename = `CyberChef_${process.env.GITHUB_SHA || `v${pkg.version}`}.zip`, version = process.env.GITHUB_SHA || `v${pkg.version}`,
downloadZipFilename = `CyberChef_${version}.zip`,
webpackConfig = require("./webpack.config.js"), webpackConfig = require("./webpack.config.js"),
BUILD_CONSTANTS = { BUILD_CONSTANTS = {
COMPILE_YEAR: JSON.stringify(compileYear), COMPILE_YEAR: JSON.stringify(compileYear),
@ -130,7 +131,8 @@ module.exports = function (grunt) {
chunks: ["main"], chunks: ["main"],
compileYear: compileYear, compileYear: compileYear,
compileTime: compileTime, compileTime: compileTime,
version: pkg.version, version: version,
latestReleaseVersion: pkg.version,
downloadZipFilename: downloadZipFilename, downloadZipFilename: downloadZipFilename,
minify: { minify: {
removeComments: true, removeComments: true,

View File

@ -868,10 +868,10 @@
Be aware that the standalone version will never update itself, meaning it will not receive bug fixes or new features until you re-download newer versions manually. Be aware that the standalone version will never update itself, meaning it will not receive bug fixes or new features until you re-download newer versions manually.
</p> </p>
<h6>CyberChef v<%= htmlWebpackPlugin.options.version %></h6> <h6>CyberChef <%= htmlWebpackPlugin.options.version %></h6>
<ul> <ul>
<li>Build time: <%= htmlWebpackPlugin.options.compileTime %></li> <li>Build time: <%= htmlWebpackPlugin.options.compileTime %></li>
<li>The changelog for this version can be viewed <a href="https://github.com/gchq/CyberChef/blob/v<%= htmlWebpackPlugin.options.version %>/CHANGELOG.md">here</a></li> <li>The changelog for this version can be viewed <a href="https://github.com/gchq/CyberChef/blob/v<%= htmlWebpackPlugin.options.latestReleaseVersion %>/CHANGELOG.md">here</a></li>
<li>&copy; Crown Copyright 2016-<%= htmlWebpackPlugin.options.compileYear %></li> <li>&copy; Crown Copyright 2016-<%= htmlWebpackPlugin.options.compileYear %></li>
<li>Released under the Apache Licence, Version 2.0</li> <li>Released under the Apache Licence, Version 2.0</li>
<li>SHA256 hash: DOWNLOAD_HASH_PLACEHOLDER</li> <li>SHA256 hash: DOWNLOAD_HASH_PLACEHOLDER</li>