Skip to content

Commit

Permalink
chore(developer): verify bundled node version when building installer
Browse files Browse the repository at this point in the history
The node version must be an exact match at this time. Also updated
node.exe accordingly.

Fixes: #12075
  • Loading branch information
mcdurdin committed Dec 9, 2024
1 parent f1a073b commit 2576acc
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 226 deletions.
22 changes: 21 additions & 1 deletion developer/src/inst/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
## END STANDARD BUILD SCRIPT INCLUDE

source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
source "$KEYMAN_ROOT/resources/build/jq.inc.sh"

builder_describe "Installation files for Keyman Developer" \
@/common/windows/data \
Expand Down Expand Up @@ -51,6 +52,7 @@ function do_clean() {

function do_publish() {
verify-program-signatures
verify-node-installer-version

"$KEYMAN_ROOT/common/windows/cef-checkout.sh"

Expand Down Expand Up @@ -81,6 +83,10 @@ function do_publish() {
verify-installer-signatures
}

function do_test() {
verify-node-installer-version
}

function copy-kmdev() {
builder_heading copy-kmdev

Expand All @@ -105,6 +111,20 @@ function verify-installer-signatures() {
verify-all-executable-signatures-in-folder "$DEVELOPER_ROOT/release/${VERSION}"
}

function verify-node-installer-version() {
builder_heading verify-node-installer-version

local REQUIRED_NODE_VERSION=$("$JQ" -r .engines.node < "$KEYMAN_ROOT/package.json")
local INSTALLER_NODE_VERSION="$("$THIS_SCRIPT_PATH/node/dist/node.exe" --version)"
INSTALLER_NODE_VERSION="${INSTALLER_NODE_VERSION##v}"

if [[ "$REQUIRED_NODE_VERSION" != "$INSTALLER_NODE_VERSION" ]]; then
builder_echo error "Installer node version in /developer/src/inst/node/dist/node.exe is '$INSTALLER_NODE_VERSION',"
builder_echo error "but the expected version per /package.json is '$REQUIRED_NODE_VERSION'."
builder_die "Version mismatch for bundled node.exe version"
fi
}

function test-releaseexists() {
if [[ -d "$DEVELOPER_ROOT/release/${VERSION}" ]]; then
builder_die "Release ${VERSION} already exists. Delete it or update VERSION.md and try again"
Expand Down Expand Up @@ -264,5 +284,5 @@ function copy-schemas() {
builder_run_action clean do_clean
# builder_run_action configure do_configure
# builder_run_action build do_build
# builder_run_action test do_test
builder_run_action test do_test
builder_run_action publish do_publish
94 changes: 48 additions & 46 deletions developer/src/inst/node/dist/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

Select a Node.js version below to view the changelog history:

* [Node.js 18](doc/changelogs/CHANGELOG_V18.md) **Long Term Support**
* [Node.js 20](doc/changelogs/CHANGELOG_V20.md) **Long Term Support**
* [Node.js 19](doc/changelogs/CHANGELOG_V19.md) End-of-Life
* [Node.js 18](doc/changelogs/CHANGELOG_V18.md) Long Term Support
* [Node.js 17](doc/changelogs/CHANGELOG_V17.md) End-of-Life
* [Node.js 16](doc/changelogs/CHANGELOG_V16.md) Long Term Support
* [Node.js 16](doc/changelogs/CHANGELOG_V16.md) End-of-Life
* [Node.js 15](doc/changelogs/CHANGELOG_V15.md) End-of-Life
* [Node.js 14](doc/changelogs/CHANGELOG_V14.md) Long Term Support
* [Node.js 14](doc/changelogs/CHANGELOG_V14.md) End-of-Life
* [Node.js 13](doc/changelogs/CHANGELOG_V13.md) End-of-Life
* [Node.js 12](doc/changelogs/CHANGELOG_V12.md) End-of-Life
* [Node.js 11](doc/changelogs/CHANGELOG_V11.md) End-of-Life
Expand All @@ -27,13 +29,43 @@ release.

<table>
<tr>
<th title="LTS Until 2026-04"><a href="doc/changelogs/CHANGELOG_V20.md">20</a> (LTS)</th>
<th title="LTS Until 2025-04"><a href="doc/changelogs/CHANGELOG_V18.md">18</a> (LTS)</th>
<th title="LTS Until 2023-09"><a href="doc/changelogs/CHANGELOG_V16.md">16</a> (LTS)</th>
<th title="LTS Until 2023-04"><a href="doc/changelogs/CHANGELOG_V14.md">14</a> (LTS)</th>
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.1">18.14.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.16.0">20.16.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.0">20.15.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.14.0">20.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.13.1">20.13.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.13.0">20.13.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.12.2">20.12.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.12.1">20.12.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.12.0">20.12.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.11.1">20.11.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.11.0">20.11.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.10.0">20.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.9.0">20.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.8.1">20.8.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.8.0">20.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.7.0">20.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.6.1">20.6.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.6.0">20.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.5.1">20.5.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.5.0">20.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.4.0">20.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.3.1">20.3.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.3.0">20.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.2.0">20.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.1.0">20.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.0.0">20.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.15.0">18.15.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.2">18.14.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.1">18.14.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.13.0">18.13.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.1">18.12.1</a><br/>
Expand All @@ -53,7 +85,17 @@ release.
<a href="doc/changelogs/CHANGELOG_V18.md#18.0.0">18.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.14.2">16.14.2</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.20.0">16.20.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.19.1">16.19.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.1">16.18.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.0">16.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.17.1">16.17.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.17.0">16.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.16.0">16.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.15.1">16.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.15.0">16.15.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.14.2">16.14.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.14.1">16.14.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.14.0">16.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.2">16.13.2</a><br/>
Expand All @@ -79,46 +121,6 @@ release.
<a href="doc/changelogs/CHANGELOG_V16.md#16.1.0">16.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.19.1">14.19.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.19.0">14.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.18.3">14.18.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.18.2">14.18.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.18.1">14.18.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.18.0">14.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.6">14.17.6</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.5">14.17.5</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.4">14.17.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.3">14.17.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.2">14.17.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.1">14.17.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.0">14.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.16.1">14.16.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.16.0">14.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.5">14.15.5</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.4">14.15.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.3">14.15.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.2">14.15.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.1">14.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.0">14.15.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.14.0">14.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.13.1">14.13.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.13.0">14.13.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.12.0">14.12.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.11.0">14.11.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.10.1">14.10.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.10.0">14.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.9.0">14.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.8.0">14.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.7.0">14.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.6.0">14.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.5.0">14.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.4.0">14.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.3.0">14.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.2.0">14.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.1.0">14.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.0.0">14.0.0</a><br/>
</td>
</tr>
</table>

Expand Down
Loading

0 comments on commit 2576acc

Please sign in to comment.