Skip to content

Commit bfe5e52

Browse files
committed
use version for git urls
1 parent eba92ab commit bfe5e52

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pythonforandroid/recipe.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,18 @@ def report_hook(index, blksize, size):
9898
elif parsed_url.scheme in ('git',):
9999
if isdir(target):
100100
with current_directory(target):
101+
shprint(sh.git, 'fetch', '--tags')
102+
if self.version:
103+
shprint(sh.git, 'checkout', self.version)
101104
shprint(sh.git, 'pull')
102105
shprint(sh.git, 'pull', '--recurse-submodules')
103106
shprint(sh.git, 'submodule', 'update', '--recursive')
104107
else:
105108
shprint(sh.git, 'clone', '--recursive', url, target)
109+
if self.version:
110+
with current_directory(target):
111+
shprint(sh.git, 'checkout', self.version)
112+
shprint(sh.git, 'submodule', 'update', '--recursive')
106113
return target
107114

108115
def extract_source(self, source, cwd):

0 commit comments

Comments
 (0)