mirror of
https://github.com/coder/code-server.git
synced 2026-07-10 19:00:24 +02:00
Fix update script using old Node version
It needs to parse the version *after* the VS Code update, otherwise it is just pulling whatever the previous version was. That means we cannot use it in the step title without some refactoring; opted to just omit it for now.
This commit is contained in:
@@ -42,6 +42,8 @@ function refresh_patches() {
|
||||
function update_node() {
|
||||
local node_version
|
||||
node_version=$(cat .node-version)
|
||||
local target_node_version
|
||||
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
|
||||
if [[ $node_version == "$target_node_version" ]] ; then
|
||||
echo "Already set to $target_node_version"
|
||||
else
|
||||
@@ -116,9 +118,6 @@ function main() {
|
||||
|
||||
source ./ci/lib.sh
|
||||
|
||||
local target_node_version
|
||||
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
|
||||
|
||||
declare -a steps
|
||||
|
||||
# If version is not set, assume we are already at the target version and the
|
||||
@@ -141,7 +140,7 @@ function main() {
|
||||
fi
|
||||
|
||||
steps+=(
|
||||
"Set Node version to $target_node_version" "update_node"
|
||||
"Update Node version" "update_node"
|
||||
"Update CSP webview hash" "update_csp"
|
||||
"Add changelog note" "add_changelog"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user