Build tags

This commit is contained in:
Daniil Gentili 2019-12-28 01:02:50 +01:00
parent c77e47a8c5
commit 491b9956f8

View File

@ -1,10 +1,13 @@
#!/usr/bin/env php
<?php
$tag = \getenv('TRAVIS_TAG');
$branch = $tag ? $tag : "dev-".\getenv("TRAVIS_BRANCH");
while (true) {
$json = \json_decode(\file_get_contents('https://repo.packagist.org/p/danog/madelineproto.json'), true);
if ($json["packages"]["danog/madelineproto"]["dev-".\getenv("TRAVIS_BRANCH")]["source"]["reference"] === \getenv('TRAVIS_COMMIT')) {
\sleep(1);
if ($json["packages"]["danog/madelineproto"][$branch]["source"]["reference"] === \getenv('TRAVIS_COMMIT')) {
return;
}
\sleep(1);
}