From 64522b10f995f1fa4711071974be6bd23256516d Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 6 Sep 2021 16:41:40 +0200 Subject: [PATCH] Improve build process --- tests/makephar.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/makephar.sh b/tests/makephar.sh index 0bd1b243b..9e024e6e5 100755 --- a/tests/makephar.sh +++ b/tests/makephar.sh @@ -114,33 +114,38 @@ k() while :; do pkill -f 'MadelineProto worker .*' -P $$ || break && sleep 1; done } +reset() +{ + sed 's|phar.madelineproto.xyz|empty.madelineproto.xyz|g' tools/phar.php > madeline.php +} k rm -f madeline.phar testing.madeline* echo "Testing with previous version..." export ACTIONS_FORCE_PREVIOUS=1 -cp tests/testing.php tests/testingBackup.php runTest k echo "Testing with new version (upgrade)..." php tools/makephar.php $madelinePath/../phar "madeline$php$branch.phar" "$COMMIT-$php" -export ACTIONS_PHAR="madeline$php$branch.phar" +cp "madeline$php$branch.phar" "madeline-$php.phar" +export ACTIONS_PHAR="madeline.php" +reset runTestSimple k echo "Testing with new version (restart)" -cp tests/testingBackup.php tests/testing.php +reset rm -f testing.madeline* || echo runTest echo "Testing with new version (reload)" -cp tests/testingBackup.php tests/testing.php +reset runTestSimple k echo "Testing with new version (kill+reload)" -cp tests/testingBackup.php tests/testing.php +reset runTestSimple echo "Checking syntax of madeline.php"