We are using hierarchical branch names so we have something like:
- master
- somework (branched off and merged into master)
- olderrelease/master
- olderrelease/someworkonolderrelease (branched off and merged into olderrelease/master)
We have set up TeamCity so that one set of build projects will build only git branches that are prefixed with olderrelease/
. The branch specifications for these builds is refs/heads/olderrelease/*
.
This has been working well for us. However, the problem is with TeamCity projects without a prefix, where we need to negate all sub-folders. For these we've been doing the following:
+:refs/heads/*
-:refs/heads/olderrelease/*
This does work but we've got quite a few sub-folders now so excluding them all with -:
is getting very repetitive quickly, especially when you add tags into the mix too.
What I want to write is something like:
+:refs/heads/*
-:refs/heads/*/*
But this doesn't work. Is there any way of including the root branches but excluding any nested branch "folders"?