Move more branch selection to helper functions
Works with versions bound to a particular Fedora release are branched
and built for each release. The builders are fed a list of 'approved'
branches, and monitor activity in each repo for each approved branch.
Branches of guides *must* follow the project-wide convention of "fN" for
their content to be picked up. "F20" doesn't count, "f20-latest" is
ignored, "20" is not published. The builders care about "f20" or "f22".
Previously, this branch list was more or less manually maintained. This
commit changes that to query Fedora pkgdb instead, offloading the
maintenance of the list to releng, because they're doing it anyway.
There is one opportunity for docs-level policy enforcement: which
branches are published and which are not. Initially, this is configured
to publish four versions of a given work, although this is of course up
for discussion:
- The release under development (N+1, ie Alpha, Beta docs)
- The current primary release (N)
- The current maintenance release (N-1)
- The most recent EOL release (N-2, to help those upgrading)
There's surely a more pythonic way to grab the latest EOL release than
my overiterating, but I couldn't figure it out. It works, meh.