chiark / gitweb /
fix `fdroid build` with non-git repos
authorHans-Christoph Steiner <hans@eds.org>
Thu, 1 Dec 2016 22:29:38 +0000 (23:29 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 5 Dec 2016 19:19:56 +0000 (20:19 +0100)
HEAD is really only in git.  This was introduced in
a4e4310803a463433eb7515c2038a8d3ea44edc4

fdroidserver/metadata.py

index 2d2a5bf1c088b69fcf5a1bc6dac7e19413ce0422..c70b1642becc2fcb378e9dae18f6ddd883a32e89 100644 (file)
@@ -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))