Skip to content

Commit d103d50

Browse files
committed
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.
1 parent aed61bf commit d103d50

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

ci/build/update-vscode.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ function refresh_patches() {
4242
function update_node() {
4343
local node_version
4444
node_version=$(cat .node-version)
45+
local target_node_version
46+
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
4547
if [[ $node_version == "$target_node_version" ]] ; then
4648
echo "Already set to $target_node_version"
4749
else
@@ -116,9 +118,6 @@ function main() {
116118

117119
source ./ci/lib.sh
118120

119-
local target_node_version
120-
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
121-
122121
declare -a steps
123122

124123
# If version is not set, assume we are already at the target version and the
@@ -141,7 +140,7 @@ function main() {
141140
fi
142141

143142
steps+=(
144-
"Set Node version to $target_node_version" "update_node"
143+
"Update Node version" "update_node"
145144
"Update CSP webview hash" "update_csp"
146145
"Add changelog note" "add_changelog"
147146
)

0 commit comments

Comments
 (0)