Replace the regex trying to catch the branch name of the existing
repository which was too naive with simpler glob matching.
As a result the only case when we only use the new packages are:
moving from alpha to beta
moving from beta to rc
moving from rc to release
changing the major version number for the main git branch