1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 22:51:11 +01:00

Switch to github actions

This commit is contained in:
Daniil Gentili 2021-03-30 20:57:10 +02:00
parent 6a95460c98
commit 882537f4cc
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 8 additions and 38 deletions

View File

@ -1,24 +0,0 @@
dist: xenial
language: php
php:
- '8.0'
- '7.4'
- '7.3'
- '7.2'
- '7.1'
- '7.0'
- '5.6'
git:
submodules: false
jobs:
allow_failures:
- php: '5.6'
before_install:
- echo "phar.readonly = 0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- tests/waitPackagist.php
script:
- tests/makephar.sh

View File

@ -169,8 +169,8 @@ echo "Testing with new version (reload)"
cp tests/testingBackup.php tests/testing.php cp tests/testingBackup.php tests/testing.php
runTestSimple runTestSimple
echo "Checking syntax of madeline.php"
php -l ./tools/phar.php
eval "$(ssh-agent -s)" eval "$(ssh-agent -s)"
echo -e "$private_key" > madeline_rsa echo -e "$private_key" > madeline_rsa

View File

@ -70,19 +70,13 @@ function ___install_madeline()
$custom_branch = ''; $custom_branch = '';
} }
$release_branch = "-$custom_branch"; $version = (string) min(80, (int) (PHP_MAJOR_VERSION.PHP_MINOR_VERSION));
if ($release_branch === '-') { if ($custom_branch === '') {
$release_branch = ''; $release_branch = $version;
} } else {
$release_fallback_branch = ''; $release_branch = "$version-$custom_branch";
if (PHP_MAJOR_VERSION <= 5) {
$release_branch = '5'.$release_branch;
$release_fallback_branch = '5'.$release_fallback_branch;
} elseif (PHP_MAJOR_VERSION === 7) {
$release_branch = PHP_MAJOR_VERSION.PHP_MINOR_VERSION.$release_branch;
$release_fallback_branch = PHP_MAJOR_VERSION.PHP_MINOR_VERSION.$release_fallback_branch;
} }
$release_fallback_branch = $version;
// Checking if defined branch/default branch builds can be downloaded // Checking if defined branch/default branch builds can be downloaded
if (!($release = @\file_get_contents(\sprintf($release_template, $release_branch)))) { if (!($release = @\file_get_contents(\sprintf($release_template, $release_branch)))) {