From 750fcf84ebb3af4b6f43e7e91ea549221ed0fb10 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 4 Jan 2023 20:54:21 +0100 Subject: [PATCH] tools: move update-eslint.sh to dep_updaters/ Move the `update-eslint.sh` script to the `dep_updaters/` directory. PR-URL: https://github.com/nodejs/node/pull/46088 Refs: https://github.com/nodejs/node/actions/runs/3814364920/jobs/6488613583#step:3:64 Reviewed-By: Ruy Adorno Reviewed-By: Antoine du Hamel --- .github/workflows/tools.yml | 5 ++--- tools/{ => dep_updaters}/update-eslint.sh | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) rename tools/{ => dep_updaters}/update-eslint.sh (93%) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index e5e6f18269bfb6..3047124a782f67 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -21,12 +21,11 @@ jobs: subsystem: tools label: tools run: | - cd tools NEW_VERSION=$(npm view eslint dist-tags.latest) - CURRENT_VERSION=$(node -p "require('./node_modules/eslint/package.json').version") + CURRENT_VERSION=$(node -p "require('./tools/node_modules/eslint/package.json').version") if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - ./update-eslint.sh + ./tools/dep_updaters/update-eslint.sh fi - id: corepack subsystem: deps diff --git a/tools/update-eslint.sh b/tools/dep_updaters/update-eslint.sh similarity index 93% rename from tools/update-eslint.sh rename to tools/dep_updaters/update-eslint.sh index 865ea5a7ece279..7d536ef50212ab 100755 --- a/tools/update-eslint.sh +++ b/tools/dep_updaters/update-eslint.sh @@ -8,13 +8,13 @@ set -ex cd "$( dirname "$0" )" || exit -rm -rf node_modules/eslint +rm -rf ../node_modules/eslint ( rm -rf eslint-tmp mkdir eslint-tmp cd eslint-tmp || exit - ROOT="$PWD/../.." + ROOT="$PWD/../../.." [ -z "$NODE" ] && NODE="$ROOT/out/Release/node" [ -x "$NODE" ] || NODE=$(command -v node) NPM="$ROOT/deps/npm/bin/npm-cli.js" @@ -61,5 +61,5 @@ rm -rf node_modules/eslint find node_modules -name 'README*' -exec rm {} \; ) -mv eslint-tmp/node_modules/eslint node_modules/eslint +mv eslint-tmp/node_modules/eslint ../node_modules/eslint rm -rf eslint-tmp/