~ballot/wordpress/openstack-objectstorage-breaking-insight

« back to all changes in this revision

Viewing changes to vendor/phpunit/phpunit/build/phar-manifest.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env php
 
2
<?php
 
3
print 'phpunit/phpunit: ';
 
4
 
 
5
$tag = @exec('git describe --tags 2>&1');
 
6
 
 
7
if (strpos($tag, '-') === false && strpos($tag, 'No names found') === false) {
 
8
    print $tag;
 
9
} else {
 
10
    $branch = @exec('git rev-parse --abbrev-ref HEAD');
 
11
    $hash   = @exec('git log -1 --format="%H"');
 
12
    print $branch . '@' . $hash;
 
13
}
 
14
 
 
15
print "\n";
 
16
 
 
17
$lock = json_decode(file_get_contents(__DIR__ . '/../composer.lock'));
 
18
 
 
19
foreach ($lock->packages as $package) {
 
20
    print $package->name . ': ' . $package->version;
 
21
 
 
22
    if (!preg_match('/^[v= ]*(([0-9]+)(\\.([0-9]+)(\\.([0-9]+)(-([0-9]+))?(-?([a-zA-Z-+][a-zA-Z0-9\\.\\-:]*)?)?)?)?)$/', $package->version)) {
 
23
        print '@' . $package->source->reference;
 
24
    }
 
25
 
 
26
    print "\n";
 
27
}
 
28