Githubredir

Delivering .tar.gz from Github tags

Githubredir is obsolete and will go away!

Please note that githubredir is nowadays considered to be obsolete. Github now provides a clean way to query for the tags: A human-facing interface:

https://github.com/author/project/tags

And a more machine-oriented interface:

https://api.github.com/repos/author/project/tags

A suitable debian/watch for this project would be:

version=3
opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/project-$1.tar.gz/"
  https://github.com/author/project/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz

In a not too distant future, this service will be no longer provided.

What is this?

There is quite a bit of software whose upstream authors decide that, as they are already using Git for development, the main distribution channel should be GitHub - This allows, yes, for quite a bit of flexibility, which many authors have taken advantage of.

Specifically, what does this redirector make? Given that GitHub allows for downloading as a .zip or as a .tar.gz any given commit, it suddenly becomes enough to git tag with a version number, and GitHub magically makes that version available for download. Which is sweet!

Sometimes it is a bit problematic, though, to follow their format. Github gives a listing of the tags for each particular prooject, and each of those tags has a download page, with both archiving formats.

I won't go into too much detail here - Thing is, going over several pages becomes painful for Debian's uscan, widely used for various of our QA processes. There are other implemented redirectors, such as the one used for SourceForge.

Who should use this

This redirector is mainly meant to be consumed by uscan. Anybody who finds this system useful can freely use it, although you might be better served by the rich, official GitHub.com interface. If source code is your thing, grab the source here.

How to use this?

Get the GitHub project name and the author you want to follow. And just create a simple URL:

http://githubredir.debian.net/github/author/project/

That means, if you want to track, say, mislav's excellent will_paginate Ruby library:

http://githubredir.debian.net/github/mislav/will_paginate

Or you can use this oh-so-very-handy form, to play with the tool:
Author:
Project name:

But, of course, you want to include it in your debian/watch, right? Ok, so, again for Mislav's will_paginate:

version=3
http://githubredir.debian.net/github/mislav/will_paginate/ (.*).tar.gz

Please note tags can follow just about any format - I am using (.*) as a simple pattern. You might need some more stuff if the project's author is more... Baroque? :-}

Bugs, to-do, etc.

For any further questions regarding this script, please contact Gunnar Wolf.