From 1a5cddfc1f9d0355e2c2e0912d794203c8d95e39 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 29 May 2023 12:59:52 +0200 Subject: [PATCH] tools: harmonize `dep_updaters` scripts PR-URL: https://github.com/nodejs/node/pull/48201 Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca Reviewed-By: Mestery Reviewed-By: Rafael Gonzaga --- tools/dep_updaters/update-acorn.sh | 21 ++++++++------- tools/dep_updaters/update-base64.sh | 2 +- tools/dep_updaters/update-cjs-module-lexer.sh | 2 +- tools/dep_updaters/update-undici.sh | 26 +++++++++++++------ 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/tools/dep_updaters/update-acorn.sh b/tools/dep_updaters/update-acorn.sh index 4f6bf6b0dd7a43..21b2e018c0221d 100755 --- a/tools/dep_updaters/update-acorn.sh +++ b/tools/dep_updaters/update-acorn.sh @@ -34,17 +34,18 @@ rm -rf deps/acorn/acorn "$NODE" "$NPM" init --yes "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts "acorn@$NEW_VERSION" - cd node_modules/acorn - # update this version information in src/acorn_version.h - FILE_PATH="$ROOT/src/acorn_version.h" - echo "// This is an auto generated file, please do not edit." > "$FILE_PATH" - echo "// Refer to tools/update-acorn.sh" >> "$FILE_PATH" - echo "#ifndef SRC_ACORN_VERSION_H_" >> "$FILE_PATH" - echo "#define SRC_ACORN_VERSION_H_" >> "$FILE_PATH" - echo "#define ACORN_VERSION \"$NEW_VERSION\"" >> "$FILE_PATH" - echo "#endif // SRC_ACORN_VERSION_H_" >> "$FILE_PATH" ) +# update version information in src/acorn_version.h +cat > "$ROOT/src/acorn_version.h" < "$FILE_PATH" - echo "// Refer to tools/update-undici.sh" >> "$FILE_PATH" - echo "#ifndef SRC_UNDICI_VERSION_H_" >> "$FILE_PATH" - echo "#define SRC_UNDICI_VERSION_H_" >> "$FILE_PATH" - echo "#define UNDICI_VERSION \"$NEW_VERSION\"" >> "$FILE_PATH" - echo "#endif // SRC_UNDICI_VERSION_H_" >> "$FILE_PATH" ) +# update version information in src/undici_version.h +cat > "$ROOT/src/undici_version.h" <