diff --git a/docs/binary.rst b/docs/binary.rst index 49b60a405..ef9f4f211 100644 --- a/docs/binary.rst +++ b/docs/binary.rst @@ -63,6 +63,25 @@ particular desktop, but it should work for most major desktop environments. Customizing the installation -------------------------------- +.. _nightly: + +* You can install the latest nightly kitty build with ``installer``: + + .. parsed-literal:: + :class: pre + + |ins| \\ + installer=nightly + + If you want to install it in parallel to the released kitty specify a + different install locations with ``dest``: + + .. parsed-literal:: + :class: pre + + |ins| \\ + installer=nightly dest=/some/other/location + * You can specify a different install location, with ``dest``: .. parsed-literal:: @@ -88,6 +107,7 @@ Customizing the installation |ins| \\ installer=/path/to/dmg or tarball + Uninstalling ---------------- diff --git a/docs/build.rst b/docs/build.rst index ec34a557a..a54e191e6 100644 --- a/docs/build.rst +++ b/docs/build.rst @@ -10,6 +10,9 @@ Build from source |kitty| is designed to run from source, for easy hack-ability. Make sure the following dependencies are installed first. +.. note:: + If you just want to test the latest changes to kitty you dont need to build + from source. Instead install the :ref:`latest nightly build `. .. note:: If you are making small changes only to the python parts of kitty, there is no need to diff --git a/docs/installer.py b/docs/installer.py index 8b4dd4768..3aea3ae70 100644 --- a/docs/installer.py +++ b/docs/installer.py @@ -73,6 +73,14 @@ class Reporter: # {{{ # }}} +def get_nightly_url(): + base = 'https://github.com/kovidgoyal/kitty/releases/download/nightly/kitty-nightly' + if is_macos: + return base + '.dmg' + arch = 'x86_64' if is64bit else 'i686' + return base + '-' + arch + '.txz' + + def get_latest_release_data(): print('Checking for latest release on GitHub...') req = urllib.Request('https://api.github.com/repos/kovidgoyal/kitty/releases/latest', headers={'Accept': 'application/vnd.github.v3+json'}) @@ -194,9 +202,12 @@ def main(dest=None, launch=True, installer=None): url, size = get_latest_release_data() installer = download_installer(url, size) else: - installer = os.path.abspath(installer) - if not os.access(installer, os.R_OK): - raise SystemExit('Could not read from: {}'.format(installer)) + if installer == 'nightly': + url = get_nightly_url() + else: + installer = os.path.abspath(installer) + if not os.access(installer, os.R_OK): + raise SystemExit('Could not read from: {}'.format(installer)) if is_macos: macos_install(installer, dest=dest, launch=launch) else: diff --git a/publish.py b/publish.py index adcb34943..98abed235 100755 --- a/publish.py +++ b/publish.py @@ -242,8 +242,11 @@ class GitHub(Base): # {{{ now = str(datetime.datetime.utcnow()).split('.')[0] + ' UTC' with open('.git/refs/heads/master') as f: commit = f.read().strip() - self.patch(url, 'Failed to update nightly release description', - body=f'Nightly release, generated on: {now} from commit: {commit}') + self.patch( + url, 'Failed to update nightly release description', + body=f'Nightly release, generated on: {now} from commit: {commit}.' + ' For how to install nightly builds, see: https://sw.kovidgoyal.net/kitty/binary/#customizing-the-installation' + ) def __call__(self) -> None: releases = self.releases()