File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ console.log(tag_name.replace('openssl-', ''));
2323EOF
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 "
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 "
You can’t perform that action at this time.
0 commit comments