mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Test changing of update_check_interval on the CI server
This commit is contained in:
parent
a75d075dd1
commit
d12a4b0a1a
2 changed files with 8 additions and 7 deletions
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
- run: python3 test.py
|
||||
- run: make FAIL_WARN=-W man
|
||||
- run: make FAIL_WARN=-W html
|
||||
- run: python3 setup.py linux-package
|
||||
- run: python3 setup.py linux-package --update-check-interval=0
|
||||
|
||||
lin-35:
|
||||
docker:
|
||||
|
|
|
|||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue