mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 09:51:15 +01:00
Fixes to phar scripts
This commit is contained in:
parent
ba7e67caf4
commit
322f7dd831
@ -14,6 +14,10 @@ If not, see <http://www.gnu.org/licenses/>.
|
||||
require 'vendor/autoload.php';
|
||||
use Spatie\Php7to5\DirectoryConverter;
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
die('This script requires a parameter with the commit number to turn into a phar');
|
||||
}
|
||||
|
||||
function rimraf($dir)
|
||||
{
|
||||
if (is_dir($dir)) {
|
||||
@ -41,7 +45,7 @@ file_put_contents('composer.json', '{
|
||||
"name": "danog/madelineprototests",
|
||||
"minimum-stability":"dev",
|
||||
"require": {
|
||||
"danog/madelineproto": "dev-master"
|
||||
"danog/madelineproto": "dev-master#'.$argv[1].'"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
|
@ -1,14 +1,15 @@
|
||||
#!/bin/sh -e
|
||||
composer update
|
||||
php makephar.php
|
||||
php makephar.php $TRAVIS_COMMIT
|
||||
|
||||
[ -d JSON.sh ] || git clone https://github.com/dominictarr/JSON.sh
|
||||
|
||||
for chat_id in $destinations;do
|
||||
ID=$(curl 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 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 https://api.telegram.org/bot$token/sendDocument -F caption="md5: $(md5sum madeline.phar | sed 's/\s.*//g')
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user