Document how to install the nightly builds

This commit is contained in:
Kovid Goyal 2021-09-17 07:32:51 +05:30
parent 9eebd2c921
commit 9f4f22743f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 42 additions and 5 deletions

View File

@ -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
----------------

View File

@ -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 <nightly>`.
.. note::
If you are making small changes only to the python parts of kitty, there is no need to

View File

@ -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:

View File

@ -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()