Skip to content

Commit 9c3ee3d

Browse files
committed
minor symfony#41228 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config (derrabus)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Introduce SYMFONY_FEATURE_BRANCH variable in Travis config | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | symfony#40887 | License | MIT | Doc PR | not needed This PR proposes to introduce a `SYMFONY_FEATURE_BRANCH` variable that always points to the branch of Symfony's next feature release. This is a setting that we need to adjust twice a year. This way, the branch does not have to follow the `.x` suffix convention anymore. ~~I'm currently testing my changes against the 5.x branch. As soon as the PR is ready, I will target 4.4.~~ Update: `SYMFONY_FEATURE_BRANCH` is now populated via an API request. Commits ------- 7de11c0 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config
2 parents 9066677 + 7de11c0 commit 9c3ee3d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ before_install:
5555
export COMPOSER_UP='composer update --no-progress --ansi'
5656
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
5757
export SYMFONY_DEPRECATIONS_HELPER=max[indirect]=170
58+
export SYMFONY_FEATURE_BRANCH=$(curl -s https://flex.symfony.com/versions.json | jq -r '."dev-name"')
5859
5960
nanoseconds () {
6061
local cmd="date"
@@ -201,7 +202,7 @@ install:
201202
202203
- |
203204
# For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components
204-
if [[ $deps = high && $TRAVIS_BRANCH = *.x ]]; then
205+
if [[ $deps = high && $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH ]]; then
205206
export FLIP='^'
206207
export SYMFONY_VERSION=$(echo "$SYMFONY_VERSIONS" | grep -o '/[1-9]\.[0-9].*' | tail -n 1 | sed s/.//) &&
207208
git fetch --depth=2 origin $SYMFONY_VERSION &&
@@ -211,7 +212,7 @@ install:
211212
212213
- |
213214
# Skip the phpunit-bridge on bugfix-branches when $deps is empty
214-
if [[ ! $deps && ! $TRAVIS_BRANCH = *.x ]]; then
215+
if [[ ! $deps && ! $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH ]]; then
215216
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
216217
fi
217218
@@ -263,7 +264,7 @@ install:
263264
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
264265
COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
265266
266-
if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = *.x && $TRAVIS_PULL_REQUEST != false && $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1) = *.x ]]; then
267+
if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH && $TRAVIS_PULL_REQUEST != false && $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1) = $SYMFONY_FEATURE_BRANCH ]]; then
267268
export FLIP='^'
268269
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
269270
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"

0 commit comments

Comments
 (0)