Skip to content

Commit 724f9d6

Browse files
marco-ippolitotargos
authored andcommitted
tools: create llhttp update action
PR-URL: #46766 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent f886681 commit 724f9d6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/tools.yml

+13
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@ jobs:
164164
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
165165
./tools/update-nghttp2.sh "$NEW_VERSION"
166166
fi
167+
- id: llhttp
168+
subsystem: deps
169+
label: dependencies
170+
run: |
171+
NEW_VERSION=$(gh api repos/nodejs/llhttp/releases/latest -q '.tag_name|ltrimstr("release/v")')
172+
CURRENT_MAJOR_VERSION=$(grep "#define LLHTTP_VERSION_MAJOR" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*MAJOR \(.*\)/\1/p")
173+
CURRENT_MINOR_VERSION=$(grep "#define LLHTTP_VERSION_MINOR" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*MINOR \(.*\)/\1/p")
174+
CURRENT_PATCH_VERSION=$(grep "#define LLHTTP_VERSION_PATCH" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*PATCH \(.*\)/\1/p")
175+
CURRENT_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_PATCH_VERSION"
176+
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
177+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
178+
./tools/update-llhttp.sh "$NEW_VERSION"
179+
fi
167180
steps:
168181
- uses: actions/checkout@v3
169182
with:

0 commit comments

Comments
 (0)