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 commit07a6e1db06
) (cherry picked from commit503ecb4914
)
This commit is contained in:
committed by
Luca Boccassi
parent
8a7a035f12
commit
d298feaa90
@@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user