From a8b8a2e143a44dd9b0f6e40d1dfd3367f0ea1623 Mon Sep 17 00:00:00 2001 From: rkerner Date: Wed, 11 Feb 2015 15:57:33 +0100 Subject: [PATCH] * added non-feature-branches to handle non-numeric branches matching configured patterns not been handled as feature branches * added documentation to doc/04-schema.md --- doc/04-schema.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/04-schema.md b/doc/04-schema.md index 96641e8fe..a7be21766 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -786,3 +786,32 @@ The example will include `/dir/foo/bar/file`, `/foo/bar/baz`, `/file.php`, Optional. ← [Command-line interface](03-cli.md) | [Repositories](05-repositories.md) → + +### non-feature-branches + +A list of regex patterns of branch names that are non-numeric (e.g. "latest" or something), that will NOT be handled as feature branches. This is an array of string. + +If you have non-numeric branch names, for example like "latest", "current", "latest-stable" +or something, that do not look like a version number, then composer handles such branches +as feature branches. This means it searches for parent branches, that look like a version +or ends at special branches (like master) and the root package version number becomes the +version of the parent branch or at least master or something. + +To handle non-numeric named branches as versions instead of searching for a parent branch +with a valid version or special branch name like master, you can set patterns for branch +names, that should be handled as dev version branches. + +An example: + If you have a testing branch, that is heavily maintained during a testing phase and is + deployed to your staging environment, normally "composer show -s" will give you "versions : * dev-master". + + If you configure latest-.* as a pattern for non-feature-branches like this: + + { + "non-feature-branches": ["latest-.*"] + } + + Then "composer show -s" will give you "versions : * dev-latest-testing". + + +Optional. \ No newline at end of file