From: Hans-Christoph Steiner Date: Thu, 1 Dec 2016 22:29:38 +0000 (+0100) Subject: fix `fdroid build` with non-git repos X-Git-Tag: 0.8~141^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e37be9b06303302220292ecf5b48c8382533d4f8;p=fdroidserver.git fix `fdroid build` with non-git repos HEAD is really only in git. This was introduced in a4e4310803a463433eb7515c2038a8d3ea44edc4 --- diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 2d2a5bf1..c70b1642 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -992,7 +992,8 @@ def parse_metadata(metadatapath, check_vcs=False): metadata_in_repo = os.path.join(build_dir, '.fdroid.yml') if not os.path.isfile(metadata_in_repo): vcs, build_dir = fdroidserver.common.setup_vcs(app) - vcs.gotorevision('HEAD') # HEAD since we can't know where else to go + if isinstance(vcs, fdroidserver.common.vcs_git): + vcs.gotorevision('HEAD') # HEAD since we can't know where else to go if os.path.isfile(metadata_in_repo): logging.debug('Including metadata from ' + metadata_in_repo) app.update(parse_metadata(metadata_in_repo))