1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 06:59:01 +01:00

More improvements to the build process

This commit is contained in:
Daniil Gentili 2021-09-06 16:52:05 +02:00
parent 64522b10f9
commit ad8841b344
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 8 additions and 6 deletions

View File

@ -116,7 +116,8 @@ k()
reset()
{
sed 's|phar.madelineproto.xyz|empty.madelineproto.xyz|g' tools/phar.php > madeline.php
sed 's|phar.madelineproto.xyz/madeline|empty.madelineproto.xyz/madeline|g' tools/phar.php > madeline.php
cp madeline.php madelineBackup.php
}
k
rm -f madeline.phar testing.madeline*
@ -129,7 +130,7 @@ k
echo "Testing with new version (upgrade)..."
php tools/makephar.php $madelinePath/../phar "madeline$php$branch.phar" "$COMMIT-$php"
cp "madeline$php$branch.phar" "madeline-$php.phar"
export ACTIONS_PHAR="madeline.php"
export ACTIONS_PHAR=1
reset
runTestSimple
k
@ -161,9 +162,9 @@ fi
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "Github Actions"
rm -rf MadelineProtoPhar
git clone git@github.com:danog/MadelineProtoPhar
[ ! -d MadelineProtoPhar ] && git clone git@github.com:danog/MadelineProtoPhar
cd MadelineProtoPhar
git pull
cp "../madeline$php$branch.phar" .
cp ../tools/phar.php ../examples/mtproxyd .

View File

@ -17,8 +17,9 @@ If not, see <http://www.gnu.org/licenses/>.
$loader = false;
if ($phar = \getenv('ACTIONS_PHAR')) {
$loader = include $phar;
if (\getenv('ACTIONS_PHAR')) {
$loader = include 'madeline.php';
copy('madelineBackup.php', 'madeline.php');
} elseif (!\file_exists(__DIR__.'/../vendor/autoload.php') || \getenv('ACTIONS_FORCE_PREVIOUS')) {
echo 'You did not run composer update, using madeline.php'.PHP_EOL;
if (!\file_exists('madeline.php')) {