mirror of
https://github.com/coder/code-server.git
synced 2026-07-11 11:20:25 +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() {
|
function update_node() {
|
||||||
local node_version
|
local node_version
|
||||||
node_version=$(cat .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
|
if [[ $node_version == "$target_node_version" ]] ; then
|
||||||
echo "Already set to $target_node_version"
|
echo "Already set to $target_node_version"
|
||||||
else
|
else
|
||||||
@@ -116,9 +118,6 @@ function main() {
|
|||||||
|
|
||||||
source ./ci/lib.sh
|
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
|
declare -a steps
|
||||||
|
|
||||||
# If version is not set, assume we are already at the target version and the
|
# If version is not set, assume we are already at the target version and the
|
||||||
@@ -141,7 +140,7 @@ function main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
steps+=(
|
steps+=(
|
||||||
"Set Node version to $target_node_version" "update_node"
|
"Update Node version" "update_node"
|
||||||
"Update CSP webview hash" "update_csp"
|
"Update CSP webview hash" "update_csp"
|
||||||
"Add changelog note" "add_changelog"
|
"Add changelog note" "add_changelog"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user