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 @@ -73,9 +73,9 @@ install:
73
73
- if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi
74
74
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
75
75
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
76
- - if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH $ COMPONENTS; fi
76
+ - if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $COMPONENTS; fi
77
77
- if [[ ! $skip && $deps ]]; then mv composer.json composer.json.phpunit; mv composer.json.orig composer.json; fi
78
- - if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH src/Symfony/Bridge/PhpUnit; fi
78
+ - if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit; fi
79
79
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
80
80
- 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
81
81
- 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 @@ -49,7 +49,7 @@ install:
49
49
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.2.1/composer.phar)
50
50
- php composer.phar self-update
51
51
- copy /Y .composer\* %APPDATA%\Composer\
52
- - php .github/build-packages.php "HEAD^" %APPVEYOR_REPO_BRANCH% src\Symfony\Bridge\PhpUnit
52
+ - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
53
53
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
54
54
- php composer.phar update --no-progress --ansi
55
55
- SET COMPOSER_ROOT_VERSION=
You can’t perform that action at this time.
0 commit comments