Merge pull request #337 from kived/fix-android-branch
fix changing android branch
This commit is contained in:
commit
d560bef7d3
1 changed files with 8 additions and 4 deletions
|
@ -485,10 +485,14 @@ class TargetAndroid(Target):
|
|||
cwd=self.buildozer.platform_dir)
|
||||
elif self.platform_update:
|
||||
cmd('git clean -dxf', cwd=pa_dir)
|
||||
cmd('git pull origin {}'.format(source), cwd=pa_dir)
|
||||
|
||||
if source:
|
||||
cmd('git checkout {branch}'.format(branch=source), cwd=pa_dir)
|
||||
current_branch = cmd('git rev-parse --abbrev-ref HEAD',
|
||||
get_stdout=True, cwd=pa_dir)[0].strip()
|
||||
if current_branch == source:
|
||||
cmd('git pull', cwd=pa_dir)
|
||||
else:
|
||||
cmd('git fetch --tags origin {0}:{0}'.format(source),
|
||||
cwd=pa_dir)
|
||||
cmd('git checkout {}'.format(source), cwd=pa_dir)
|
||||
|
||||
self._install_apache_ant()
|
||||
self._install_android_sdk()
|
||||
|
|
Loading…
Reference in a new issue