File tree 3 files changed +10
-7
lines changed
3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- if (4 > $ _SERVER ['argc ' ]) {
4
- echo "Usage: branch version dir1 dir2 ... dirN \n" ;
3
+ if (3 > $ _SERVER ['argc ' ]) {
4
+ echo "Usage: branch dir1 dir2 ... dirN \n" ;
5
5
exit (1 );
6
6
}
7
7
chdir (dirname (__DIR__ ));
8
8
9
9
$ dirs = $ _SERVER ['argv ' ];
10
10
array_shift ($ dirs );
11
11
$ mergeBase = trim (shell_exec (sprintf ('git merge-base %s HEAD ' , array_shift ($ dirs ))));
12
- $ version = array_shift ($ dirs );
13
12
14
13
$ packages = array ();
15
14
$ flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0 ;
40
39
}
41
40
passthru ("cd $ dir && tar -cf package.tar --exclude='package.tar' * " );
42
41
43
- $ package ->version = $ version .'.999 ' ;
42
+ if (!isset ($ package ->extra ->{'branch-alias ' }->{'dev-master ' })) {
43
+ echo "Missing \"dev-master \" branch-alias in composer.json extra. \n" ;
44
+ exit (1 );
45
+ }
46
+ $ package ->version = str_replace ('-dev ' , '.999 ' , $ package ->extra ->{'branch-alias ' }->{'dev-master ' });
44
47
$ package ->dist ['type ' ] = 'tar ' ;
45
48
$ package ->dist ['url ' ] = 'file:// ' .str_replace (DIRECTORY_SEPARATOR , '/ ' , dirname (__DIR__ ))."/ $ dir/package.tar " ;
46
49
Original file line number Diff line number Diff line change @@ -65,9 +65,9 @@ install:
65
65
- if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi
66
66
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
67
67
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
68
- - if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH $ COMPONENTS; fi
68
+ - if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $COMPONENTS; fi
69
69
- if [[ ! $skip && $deps ]]; then mv composer.json composer.json.phpunit; mv composer.json.orig composer.json; fi
70
- - if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH src/Symfony/Bridge/PhpUnit; fi
70
+ - if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit; fi
71
71
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
72
72
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi
73
73
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ install:
51
51
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.2.1/composer.phar)
52
52
- php composer.phar self-update
53
53
- copy /Y .composer\* %APPDATA%\Composer\
54
- - php .github/build-packages.php "HEAD^" %APPVEYOR_REPO_BRANCH% src\Symfony\Bridge\PhpUnit
54
+ - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
55
55
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
56
56
- php composer.phar update --no-progress --ansi
57
57
- SET COMPOSER_ROOT_VERSION=
You can’t perform that action at this time.
0 commit comments