Skip to content

Commit 75c8b79

Browse files
Bumped Node.js version we use in the bootsrap job
Ticket: ENT-12748 Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech> (cherry picked from commit 43d1174)
1 parent 357d1ef commit 75c8b79

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎ci/linux-install-node.sh‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
node_version=20.10.0
3+
node_version=24.22.2
44

55
npm install compare-versions
66

@@ -14,16 +14,17 @@ fi
1414

1515
cd /opt
1616
sudo curl -k -O https://unofficial-builds.nodejs.org/download/release/v$node_version/node-v$node_version-linux-x64-glibc-217.tar.xz
17-
echo "dcfc5dfcdea4d0883bb35a4f2e09bc4745b6e689d88f4ad09d9ccc252024049b node-v$node_version-linux-x64-glibc-217.tar.xz" | sudo tee node-v$node_version-linux-x64-glibc-217.tar.xz.sha256
17+
echo "2644f0845671e149b8b0705a4fdcca2993995348618dc98c681ba0c7cdf604d2 node-v$node_version-linux-x64-glibc-217.tar.xz" | sudo tee node-v$node_version-linux-x64-glibc-217.tar.xz.sha256
1818
sudo sha256sum --check node-v$node_version-linux-x64-glibc-217.tar.xz.sha256
1919
sudo tar xf node-v$node_version-linux-x64-glibc-217.tar.xz
2020
sudo tee /etc/profile.d/nodejs.sh << EOF
2121
export NODE_HOME=/opt/node-v$node_version-linux-x64-glibc-217
2222
export PATH=\$PATH:\$NODE_HOME/bin
2323
EOF
24-
sudo update-alternatives --install /usr/bin/node node /opt/node-v$node_version-linux-x64-glibc-217/bin/node 1
25-
sudo update-alternatives --install /usr/bin/npm npm /opt/node-v$node_version-linux-x64-glibc-217/bin/npm 1
26-
sudo update-alternatives --install /usr/bin/npx npx /opt/node-v$node_version-linux-x64-glibc-217/bin/npx 1
27-
sudo update-alternatives --install /usr/bin/corepack corepack /opt/node-v$node_version-linux-x64-glibc-217/bin/corepack 1
24+
for tool in node npm npx corepack; do
25+
sudo update-alternatives --install /usr/bin/$tool $tool /opt/node-v$node_version-linux-x64-glibc-217/bin/$tool 1
26+
# an older version may already be registered with the same priority, so select the new one explicitly
27+
sudo update-alternatives --set $tool /opt/node-v$node_version-linux-x64-glibc-217/bin/$tool
28+
done
2829
cd /root
2930

0 commit comments

Comments
 (0)