Update documentation, update travis ci build script

This commit is contained in:
Daniil Gentili 2018-02-20 20:47:25 +00:00
parent bafe907df0
commit ec4fc804bb
4 changed files with 21 additions and 17 deletions

View File

@ -367,11 +367,12 @@ Here are the default values for the settings arrays and explanations for every s
'timeout' => 2, // timeout for sockets
'proxy' => '\Socket', // The proxy class to use
'proxy_extra' => [], // Extra parameters to pass to the proxy class using setExtra
'pfs' => true, // Should we use PFS for this socket?
],
],
'app_info' => [ // obtained in https://my.telegram.org
//'api_id' => you should put an API id in the settings array you provide
//'api_hash' => you should put an API hash in the settings array you provide
'api_id' => you should put an API id in the settings array you provide
'api_hash' => you should put an API hash in the settings array you provide
'device_model' => $device_model,
'system_version' => $system_version,
'app_version' => 'Unicorn',

View File

@ -371,11 +371,12 @@ Here are the default values for the settings arrays and explanations for every s
'timeout' => 2, // timeout for sockets
'proxy' => '\Socket', // The proxy class to use
'proxy_extra' => [], // Extra parameters to pass to the proxy class using setExtra
'pfs' => true, // Should we use PFS for this socket?
],
],
'app_info' => [ // obtained in https://my.telegram.org
//'api_id' => you should put an API id in the settings array you provide
//'api_hash' => you should put an API hash in the settings array you provide
'api_id' => you should put an API id in the settings array you provide
'api_hash' => you should put an API hash in the settings array you provide
'device_model' => $device_model,
'system_version' => $system_version,
'app_version' => 'Unicorn',

View File

@ -489,7 +489,7 @@ class MTProto
'timeout' => 2, // timeout for sockets
'proxy' => '\Socket', // The proxy class to use
'proxy_extra' => [], // Extra parameters to pass to the proxy class using setExtra
'pfs' => true,
'pfs' => true, // Should we use PFS for this socket?
],
],
'app_info' => [ // obtained in https://my.telegram.org

View File

@ -1,11 +1,13 @@
#!/bin/sh -e
composer global require spatie/7to5
echo "$TRAVIS_COMMIT_MESSAGE" | grep -q phar && {
rm -rf phar7 phar5
composer global require spatie/7to5
mkdir phar7
cd phar7
echo '{
rm -rf phar7 phar5
mkdir phar7
cd phar7
echo '{
"name": "danog/madelineprototests",
"minimum-stability":"dev",
"require": {
@ -24,21 +26,21 @@ echo '{
}
]
}' > composer.json
composer update
cd ..
composer update
cd ..
$HOME/.composer/vendor/bin/php7to5 convert --copy-all phar7 phar5
php makephar.php phar5 madeline.phar $TRAVIS_COMMIT
$HOME/.composer/vendor/bin/php7to5 convert --copy-all phar7 phar5
php makephar.php phar5 madeline.phar $TRAVIS_COMMIT
}
[ -d JSON.sh ] || git clone https://github.com/dominictarr/JSON.sh
for chat_id in $destinations;do
ID=$(curl -s https://api.telegram.org/bot$token/sendMessage -F text=" <b>Recent Commits to MadelineProto:master</b>
ID=$(curl -s https://api.telegram.org/bot$token/sendMessage -F disable_web_page_preview=1 -F text=" <b>Recent Commits to MadelineProto:master</b>
<a href=\"https://github.com/danog/MadelineProto/commit/$TRAVIS_COMMIT\">$TRAVIS_COMMIT_MESSAGE</a>
$TRAVIS_COMMIT_MESSAGE" -F parse_mode="HTML" -F chat_id=$chat_id | JSON.sh/JSON.sh -s | egrep '\["result","message_id"\]' | cut -f 2 | cut -d '"' -f 2)
curl -s https://api.telegram.org/bot$token/sendDocument -F caption="md5: $(md5sum madeline.phar | sed 's/\s.*//g')
echo "$TRAVIS_COMMIT_MESSAGE" | grep -q phar && curl -s https://api.telegram.org/bot$token/sendDocument -F caption="md5: $(md5sum madeline.phar | sed 's/\s.*//g')
commit: $TRAVIS_COMMIT" -F chat_id=$chat_id -F document=@madeline.phar -F reply_to_message_id=$ID
done