Skip to content

Commit bba2e8a

Browse files
fix: restored has update
1 parent aa70947 commit bba2e8a

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/update-openssl.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ jobs:
2121
run: |
2222
./tools/dep_updaters/update-openssl.sh download > temp-output
2323
cat temp-output
24-
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV"
24+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
25+
tail -n2 temp-output | grep "HAS_UPDATE=" >> "$GITHUB_ENV" || true
2526
rm temp-output
2627
env:
2728
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
2829
- name: Create PR with first commit
30+
if: env.HAS_UPDATE
2931
uses: gr2m/create-or-update-pull-request-action@df20b2c073090271599a08c55ae26e0c3522b329 # v1.9.2
3032
# Creates a PR with the new OpenSSL source code committed
3133
env:
@@ -40,12 +42,14 @@ jobs:
4042
path: deps/openssl
4143
update-pull-request-title-and-body: true
4244
- name: Regenerate platform specific files
45+
if: env.HAS_UPDATE
4346
run: |
4447
sudo apt install -y nasm libtext-template-perl
4548
./tools/dep_updaters/update-openssl.sh regenerate
4649
env:
4750
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
4851
- name: Add second commit
52+
if: env.HAS_UPDATE
4953
# Adds a second commit to the PR with the generated platform-dependent files
5054
uses: gr2m/create-or-update-pull-request-action@df20b2c073090271599a08c55ae26e0c3522b329 # v1.9.2
5155
env:

tools/dep_updaters/update-openssl.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ console.log(tag_name.replace('openssl-', ''));
2323
EOF
2424
)"
2525

26-
case "$NEW_VERSION" in
27-
*quic1) NEW_VERSION_NO_RELEASE_1="${NEW_VERSION%1}" ;;
28-
*) NEW_VERSION_NO_RELEASE_1="$NEW_VERSION" ;;
29-
esac
26+
case "$NEW_VERSION" in
27+
*quic1) NEW_VERSION_NO_RELEASE_1="${NEW_VERSION%1}" ;;
28+
*) NEW_VERSION_NO_RELEASE_1="$NEW_VERSION" ;;
29+
esac
3030
VERSION_H="./deps/openssl/config/archs/linux-x86_64/asm/include/openssl/opensslv.h"
3131
CURRENT_VERSION=$(grep "OPENSSL_FULL_VERSION_STR" $VERSION_H | sed -n "s/^.*VERSION_STR \"\(.*\)\"/\1/p" | sed 's/+/-/g')
3232
echo "Comparing $NEW_VERSION_NO_RELEASE_1 with $CURRENT_VERSION"
@@ -61,6 +61,9 @@ EOF
6161
echo "$ git commit -m \"deps: upgrade openssl sources to quictls/openssl-$NEW_VERSION\""
6262
echo ""
6363

64+
# Allows to proceed to step 2
65+
echo "HAS_UPDATE=true"
66+
6467
# The last line of the script should always print the new version,
6568
# as we need to add it to $GITHUB_ENV variable.
6669
echo "NEW_VERSION=$NEW_VERSION"

0 commit comments

Comments
 (0)