1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00

fetch-distro: Fetch before we switch branches

Otherwise the branch we're switching to might not exist yet.

(cherry picked from commit 07a6e1db06)
(cherry picked from commit 503ecb4914)
This commit is contained in:
Daan De Meyer
2025-03-21 21:34:12 +01:00
committed by Luca Boccassi
parent 8a7a035f12
commit d298feaa90

View File

@@ -79,12 +79,12 @@ 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] cmd = ['git', '-C', f'pkg/{distro}', 'fetch', 'origin', '-v',
f'{branch}:remotes/origin/{branch}']
print(f"+ {shlex.join(cmd)}") print(f"+ {shlex.join(cmd)}")
subprocess.check_call(cmd) subprocess.check_call(cmd)
cmd = ['git', '-C', f'pkg/{distro}', 'fetch', 'origin', '-v', cmd = ['git', '-C', f'pkg/{distro}', 'switch', branch]
f'{branch}:remotes/origin/{branch}']
print(f"+ {shlex.join(cmd)}") print(f"+ {shlex.join(cmd)}")
subprocess.check_call(cmd) subprocess.check_call(cmd)