1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

Add support for UCM:Tags in bzr

This commit is contained in:
Daniel Martí 2013-10-30 21:54:09 +01:00
parent d8d3f00e6b
commit 4c5cd7a360
3 changed files with 11 additions and 5 deletions

View File

@ -1111,9 +1111,9 @@ are known to forget to tag releases. Like RepoManifest, it will not return the
correct value if the directory containing the AndroidManifest.xml has moved.
Despite these caveats, it is the often the favourite update check mode.
It currently only works for git, hg and git-svn repositories. In the case of
the latter, the repo URL must encode the path to the trunk and tags or else no
tags will be found.
It currently only works for git, hg, bzr and git-svn repositories. In the case
of the latter, the repo URL must encode the path to the trunk and tags or else
no tags will be found.
@item
@code{HTTP} - HTTP requests are used to determine the current version code and
version name. This is controlled by the @code{Update Check Data} field, which

View File

@ -93,8 +93,8 @@ def check_tags(app, sdk_path):
build_dir = os.path.join('build/', app['id'])
repotype = app['Repo Type']
if repotype not in ('git', 'git-svn', 'hg'):
return (None, 'Tags update mode only works for git, hg and git-svn repositories currently')
if repotype not in ('git', 'git-svn', 'hg', 'bzr'):
return (None, 'Tags update mode only works for git, hg, bzr and git-svn repositories currently', None)
# Set up vcs interface and make sure we have the latest code...
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)

View File

@ -415,6 +415,12 @@ class vcs_bzr(vcs):
self.refreshed = False
self.srclib = None
def gettags(self):
p = subprocess.Popen(['bzr', 'tags'],
stdout=subprocess.PIPE, cwd=self.local)
return [tag.split(' ')[0].strip() for tag in
p.communicate()[0].splitlines()]
# Get the type expected for a given metadata field.
def metafieldtype(name):