fix changing android branch
This commit is contained in:
parent
50233a5217
commit
1f64fde8f8
1 changed files with 6 additions and 4 deletions
|
@ -485,10 +485,12 @@ 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