mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Test changing of update_check_interval on the CI server
This commit is contained in:
13
setup.py
13
setup.py
@@ -657,12 +657,13 @@ def package(args, for_bundle=False, sh_launcher=False):
|
||||
|
||||
shutil.copytree('kitty', os.path.join(libdir, 'kitty'), ignore=src_ignore)
|
||||
shutil.copytree('kittens', os.path.join(libdir, 'kittens'), ignore=src_ignore)
|
||||
with open(os.path.join(libdir, 'kitty/config_data.py'), 'r+', encoding='utf-8') as f:
|
||||
raw = f.read()
|
||||
nraw = raw.replace("update_check_interval', 24", "update_check_interval', {}".format(args.update_check_interval), 1)
|
||||
if nraw == raw:
|
||||
raise SystemExit('Failed to change the value of update_check_interval')
|
||||
f.seek(0), f.truncate(), f.write(nraw)
|
||||
if args.update_check_interval != 24.0:
|
||||
with open(os.path.join(libdir, 'kitty/config_data.py'), 'r+', encoding='utf-8') as f:
|
||||
raw = f.read()
|
||||
nraw = raw.replace("update_check_interval', 24", "update_check_interval', {}".format(args.update_check_interval), 1)
|
||||
if nraw == raw:
|
||||
raise SystemExit('Failed to change the value of update_check_interval')
|
||||
f.seek(0), f.truncate(), f.write(nraw)
|
||||
compile_python(libdir)
|
||||
for root, dirs, files in os.walk(libdir):
|
||||
for f in files:
|
||||
|
||||
Reference in New Issue
Block a user