add branch support for GitHub source
This commit is contained in:
parent
fbd046af34
commit
73b9f1bb1b
|
@ -112,6 +112,9 @@ Check `GitHub <https://github.com/>`_ for updates. The version returned is in da
|
|||
github
|
||||
The github repository, with author, e.g. ``lilydjwg/nvchecker``.
|
||||
|
||||
branch
|
||||
Which branch to track? Default: ``master``.
|
||||
|
||||
Check PyPI
|
||||
----------
|
||||
Check `PyPI <https://pypi.python.org/>`_ for updates.
|
||||
|
|
|
@ -3,11 +3,12 @@ from functools import partial
|
|||
|
||||
from tornado.httpclient import AsyncHTTPClient
|
||||
|
||||
GITHUB_URL = 'https://api.github.com/repos/%s/commits'
|
||||
GITHUB_URL = 'https://api.github.com/repos/%s/commits?sha=%s'
|
||||
|
||||
def get_version(name, conf, callback):
|
||||
repo = conf.get('github')
|
||||
url = GITHUB_URL % repo
|
||||
br = conf.get('branch', 'master')
|
||||
url = GITHUB_URL % (repo, br)
|
||||
AsyncHTTPClient().fetch(url, user_agent='lilydjwg/nvchecker',
|
||||
callback=partial(_github_done, name, callback))
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ regex = svgwrite-([\d.]+).zip
|
|||
|
||||
[you-get-git]
|
||||
github = soimort/you-get
|
||||
branch = develop
|
||||
|
||||
[ssed]
|
||||
url = http://sed.sourceforge.net/grabbag/ssed/
|
||||
|
|
Loading…
Reference in New Issue