tools/fetch-distro: switch to the target branch

We switch opensuse from "factory" to "devel". I had an old checkout that was
using the stale branch.

(cherry picked from commit 1c85d56349)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-07-03 16:11:43 +02:00 committed by Daan De Meyer
parent 8334be48a3
commit 5b9ad0bbb8

View File

@ -79,6 +79,10 @@ def update_distro(args, distro: str, config: dict):
branch = config['Environment']['GIT_BRANCH'] branch = config['Environment']['GIT_BRANCH']
old_commit = config['Environment']['GIT_COMMIT'] old_commit = config['Environment']['GIT_COMMIT']
cmd = ['git', '-C', f'pkg/{distro}', 'switch', branch]
print(f"+ {shlex.join(cmd)}")
subprocess.check_call(cmd)
cmd = ['git', '-C', f'pkg/{distro}', 'fetch', 'origin', '-v', cmd = ['git', '-C', f'pkg/{distro}', 'fetch', 'origin', '-v',
f'{branch}:remotes/origin/{branch}'] f'{branch}:remotes/origin/{branch}']
print(f"+ {shlex.join(cmd)}") print(f"+ {shlex.join(cmd)}")