Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tools: automate cares update
  • Loading branch information
marco-ippolito committed Mar 7, 2023
commit 70ed08f22a67ab0ae9caeb0bef4810dfc40f7b6f
10 changes: 10 additions & 0 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ jobs:
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
./tools/update-llhttp.sh "$NEW_VERSION"
fi
- id: cares
subsystem: deps
label: dependencies
run: |
NEW_VERSION=$(gh api repos/c-ares/c-ares/releases/latest -q '.tag_name|ltrimstr("cares-")|split("_")|join(".")')
CURRENT_VERSION=$(grep "#define ARES_VERSION_STR" ./deps/cares/include/ares_version.h | sed -n "s/^.*VERSION_STR \(.*\)/\1/p")
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
./tools/dep_updaters/update-cares.sh "$NEW_VERSION"
fi
steps:
- uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions doc/contributing/maintaining-c-ares.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Updates to the c-ares dependency involve the following steps:

## Running the update script

The `tools/update-cares.sh` script automates the update of the c-ares source
files, preserving the existing files added by Node.js.
The `tools/dep_updaters/update-cares.sh` script automates the update of
the c-ares source files, preserving the existing files added by Node.js.

In the following examples, `x.y.z` should match the c-ares version to update to.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
# Shell script to update c-ares in the source tree to a specific version

BASE_DIR=$(cd "$(dirname "$0")/.." && pwd)
BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd)
DEPS_DIR="$BASE_DIR/deps"
ARES_VERSION=$1

Expand Down