mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Rebuild before and after publishing if a branch change was needed
Sometimes branches break things
This commit is contained in:
@@ -450,11 +450,13 @@ def change_to_git_master() -> Generator[None, None, None]:
|
|||||||
branch_before = current_branch()
|
branch_before = current_branch()
|
||||||
if branch_before != 'master':
|
if branch_before != 'master':
|
||||||
subprocess.check_call(['git', 'switch', 'master'])
|
subprocess.check_call(['git', 'switch', 'master'])
|
||||||
|
subprocess.check_call(['make', 'debug'])
|
||||||
try:
|
try:
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
if branch_before != 'master':
|
if branch_before != 'master':
|
||||||
subprocess.check_call(['git', 'switch', branch_before])
|
subprocess.check_call(['git', 'switch', branch_before])
|
||||||
|
subprocess.check_call(['make', 'debug'])
|
||||||
finally:
|
finally:
|
||||||
if stash_ref_before != safe_read('.git/refs/stash'):
|
if stash_ref_before != safe_read('.git/refs/stash'):
|
||||||
subprocess.check_call(['git', 'stash', 'pop'])
|
subprocess.check_call(['git', 'stash', 'pop'])
|
||||||
|
|||||||
Reference in New Issue
Block a user