This commit is contained in:
Kovid Goyal 2022-08-26 12:54:14 +05:30
parent 1b90c03304
commit 7b2991de02
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -881,9 +881,11 @@ def safe_makedirs(path: str) -> None:
def update_go_generated_files(args: Options, kitty_exe: str) -> None:
# update all the various auto-generated go files, if needed
if args.verbose:
print('Updating Go generated files...')
print('Updating Go generated files...', flush=True)
cp = subprocess.run([kitty_exe, '+launch', os.path.join(base, 'gen-go-code.py')], stdout=subprocess.PIPE)
if cp.returncode != 0:
import traceback
traceback.print_stack()
raise SystemExit(cp.returncode)
@ -895,8 +897,6 @@ def build_kitty_tool(args: Options, launcher_dir: str, for_freeze: bool = False)
raise SystemExit('The go tool was not found on this system. Install Go')
update_go_generated_files(args, os.path.join(launcher_dir, appname))
cmd = [go, 'build', '-v']
if args.verbose:
cmd.append('-x')
ld_flags = [f"-X 'kitty.VCSRevision={get_vcs_rev_define()}'"]
if for_freeze:
ld_flags.append("-X 'kitty.IsFrozenBuild=true")