fakeupstream.cgi: implement upstream=github_releases
related bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026886
Allow upstream=github_releases to avoid unexpected failure to do packaging pre-release as an official release.
Here is the failure scenario:
- upstream make a tag as v1.0.0
- upstream releases v1.0.0 as pre-release
- upstream remove a tag v1.0.0
- upstream make a tag v1.0.0 again
- upstream releases v1.0.0 as official release
If you overlooked step 2 as a pre-release, d/watch just notify v1.0.0 released and shows it in package overview [1]
As a result, it may cause wrong version packaged into archive. If so, you need to apply many patch sets against to v1.0.0-2.
[1] https://qa.debian.org/developer.php?login=[your account]
These kind of failure is derived from difficulty of ditinguish pre-release from https://github.com/org/project/releases or https://github.com/org/project/tags.
Usage in debian/watch (assumption):
version=4
opts="searchmode=plain" \
http://qa.local/cgi-bin/fakeupstream.cgi?upstream=github_releases/google/sentencepiece \
/sentencepiece-@ANY_VERSION@@ARCHIVE_EXT@