From e37be9b06303302220292ecf5b48c8382533d4f8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 1 Dec 2016 23:29:38 +0100 Subject: [PATCH] fix `fdroid build` with non-git repos HEAD is really only in git. This was introduced in a4e4310803a463433eb7515c2038a8d3ea44edc4 --- fdroidserver/metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))