mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-07 07:50:28 +03:00
Add support for branches in the RepoManifest UCM.
This commit is contained in:
parent
678052b0e3
commit
3a7786d280
1 changed files with 4 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ def check_tags(app, sdk_path):
|
||||||
# caution, because it's inappropriate for many projects.
|
# caution, because it's inappropriate for many projects.
|
||||||
# Returns (None, "a message") if this didn't work, or (version, vercode) for
|
# Returns (None, "a message") if this didn't work, or (version, vercode) for
|
||||||
# the details of the current version.
|
# the details of the current version.
|
||||||
def check_repomanifest(app, sdk_path):
|
def check_repomanifest(app, sdk_path, branch="master"):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ def check_repomanifest(app, sdk_path):
|
||||||
# Set up vcs interface and make sure we have the latest code...
|
# Set up vcs interface and make sure we have the latest code...
|
||||||
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
|
vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
|
||||||
if app['Repo Type'] == 'git':
|
if app['Repo Type'] == 'git':
|
||||||
vcs.gotorevision('origin/master')
|
vcs.gotorevision('origin/'+branch)
|
||||||
elif app['Repo Type'] == 'git-svn':
|
elif app['Repo Type'] == 'git-svn':
|
||||||
vcs.gotorevision('trunk')
|
vcs.gotorevision('trunk')
|
||||||
|
|
||||||
|
|
@ -227,6 +227,8 @@ def main():
|
||||||
(version, vercode) = check_tags(app, sdk_path)
|
(version, vercode) = check_tags(app, sdk_path)
|
||||||
elif mode == 'RepoManifest':
|
elif mode == 'RepoManifest':
|
||||||
(version, vercode) = check_repomanifest(app, sdk_path)
|
(version, vercode) = check_repomanifest(app, sdk_path)
|
||||||
|
elif mode.startswith('RepoManifest/'):
|
||||||
|
(version, vercode) = check_repomanifest(app, sdk_path, mode[13:])
|
||||||
elif mode == 'Static':
|
elif mode == 'Static':
|
||||||
version = None
|
version = None
|
||||||
vercode = 'Checking disabled'
|
vercode = 'Checking disabled'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue