From bfe5e521b8b9cd86dcdc1b31961dbee2a28df5b5 Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Mon, 14 Dec 2015 12:35:35 -0600 Subject: [PATCH] use version for git urls --- pythonforandroid/recipe.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index 3a8f0c7968..437cde538e 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -98,11 +98,18 @@ def report_hook(index, blksize, size): elif parsed_url.scheme in ('git',): if isdir(target): with current_directory(target): + shprint(sh.git, 'fetch', '--tags') + if self.version: + shprint(sh.git, 'checkout', self.version) shprint(sh.git, 'pull') shprint(sh.git, 'pull', '--recurse-submodules') shprint(sh.git, 'submodule', 'update', '--recursive') else: shprint(sh.git, 'clone', '--recursive', url, target) + if self.version: + with current_directory(target): + shprint(sh.git, 'checkout', self.version) + shprint(sh.git, 'submodule', 'update', '--recursive') return target def extract_source(self, source, cwd):