mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Make NERD font available in CI
This commit is contained in:
5
.github/workflows/ci.py
vendored
5
.github/workflows/ci.py
vendored
@@ -15,6 +15,7 @@ from urllib.request import urlopen
|
|||||||
|
|
||||||
BUNDLE_URL = 'https://download.calibre-ebook.com/ci/kitty/{}-64.tar.xz'
|
BUNDLE_URL = 'https://download.calibre-ebook.com/ci/kitty/{}-64.tar.xz'
|
||||||
FONTS_URL = 'https://download.calibre-ebook.com/ci/fonts.tar.xz'
|
FONTS_URL = 'https://download.calibre-ebook.com/ci/fonts.tar.xz'
|
||||||
|
NERD_URL = 'https://github.com/ryanoasis/nerd-fonts/releases/latest/download/NerdFontsSymbolsOnly.tar.xz'
|
||||||
is_bundle = os.environ.get('KITTY_BUNDLE') == '1'
|
is_bundle = os.environ.get('KITTY_BUNDLE') == '1'
|
||||||
is_macos = 'darwin' in sys.platform.lower()
|
is_macos = 'darwin' in sys.platform.lower()
|
||||||
SW = ''
|
SW = ''
|
||||||
@@ -67,6 +68,10 @@ def install_fonts() -> None:
|
|||||||
os.makedirs(fonts_dir, exist_ok=True)
|
os.makedirs(fonts_dir, exist_ok=True)
|
||||||
with tarfile.open(fileobj=io.BytesIO(data), mode='r:xz') as tf:
|
with tarfile.open(fileobj=io.BytesIO(data), mode='r:xz') as tf:
|
||||||
tf.extractall(fonts_dir)
|
tf.extractall(fonts_dir)
|
||||||
|
with urlopen(NERD_URL) as f:
|
||||||
|
data = f.read()
|
||||||
|
with tarfile.open(fileobj=io.BytesIO(data), mode='r:xz') as tf:
|
||||||
|
tf.extractall(fonts_dir)
|
||||||
|
|
||||||
|
|
||||||
def install_deps() -> None:
|
def install_deps() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user