summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMarco Ippolito <marcoippolito54@gmail.com>2023-03-25 15:26:01 +0100
committerGitHub <noreply@github.com>2023-03-25 14:26:01 +0000
commit38b6ecc12e9d3458205da8c4c698cf127590c8b6 (patch)
tree3b39358412c1c8c0870bc9d4838c4e9d786ded9b /.github
parent6ed64e784a6ece38d1b2727bc516b01bdbbfca3c (diff)
downloadnode-new-38b6ecc12e9d3458205da8c4c698cf127590c8b6.tar.gz
tools: standardize update-llhttp.sh
PR-URL: https://github.com/nodejs/node/pull/47198 Refs: https://github.com/nodejs/security-wg/issues/828 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Tierney Cyren <hello@bnb.im>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/tools.yml13
1 files changed, 4 insertions, 9 deletions
diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml
index c8fbd5b4ed..0b4e8c9f79 100644
--- a/.github/workflows/tools.yml
+++ b/.github/workflows/tools.yml
@@ -150,15 +150,10 @@ jobs:
subsystem: deps
label: dependencies
run: |
- NEW_VERSION=$(gh api repos/nodejs/llhttp/releases/latest -q '.tag_name|ltrimstr("release/v")')
- CURRENT_MAJOR_VERSION=$(grep "#define LLHTTP_VERSION_MAJOR" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*MAJOR \(.*\)/\1/p")
- CURRENT_MINOR_VERSION=$(grep "#define LLHTTP_VERSION_MINOR" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*MINOR \(.*\)/\1/p")
- CURRENT_PATCH_VERSION=$(grep "#define LLHTTP_VERSION_PATCH" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*PATCH \(.*\)/\1/p")
- CURRENT_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_PATCH_VERSION"
- if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
- echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- ./tools/update-llhttp.sh "$NEW_VERSION"
- fi
+ ./tools/dep_updaters/update-llhttp.sh > temp-output
+ cat temp-output
+ tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
+ rm temp-output
- id: c-ares
subsystem: deps
label: dependencies