-
Notifications
You must be signed in to change notification settings - Fork 651
Explicit branch match should override default config #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This will require a bit of a change to the way the config stuff works. Maybe rather than throwing if there are multiple the configs from the version file are listed before defaults. Then we take the first matching option? |
Yea, that sounds like a good way to solve it. It's just that we need to stamp matched branches as |
With the change to v4 you can now remove branch configuration but just clearing it's regex value in your config. Unsure if we need this change now? |
// @cvpcs ☝️ |
I feel like there's still value in the change. Consider the scenario when you have a specific configuration you want to override on a general one. For example: release/legacyVer - configuration for a legacy versioned release Without the change both of those would match and throw an exception. You'd have to explicitly put a negative lookahead on the general configuration's regex in order to make them mutually exclusive, which feels a bit hacky. |
Sounds reasonable |
As mentioned in #868, it's a bit surprising when adding custom branch config to
GitVersion.yml
and then have GitVersion implicitly apply its default config to match the same branch (via regex). It would be less surprising if explicit config did override the default/implicit config. If we get a branch match on the explicit config, we shouldn't apply the default one to the same branch.The text was updated successfully, but these errors were encountered: