docs/RELEASE.md
This document is primarily target at zellij maintainers in need to (prepare to) release a new zellij version.
This section explains how to do a "dry-run" of the release process. This is useful to check if a release is successful beforehand, i.e. before publishing it to the world. Because there is no "undo"-button for a real release as described below, it is recommended to perform a simulated release first.
You only need a publicly accessible Git repository to provide a cargo registry.
The setup explained below will host a third-party cargo registry software
(ktra) locally on your PC. In order for
cargo to pick this up and be able to work with it, we must perform a few
modifications to the zellij repository and other components. Once setup, we
release a zellij version to this private registry and install zellij from there
to make sure it works as expected.
https://
clone-url as $INDEX_REPO for the remainder of this textconfig.json with the following content in the root:
{"dl":"http://localhost:8000/dl","api":"http://localhost:8000"}
$TOKEN for the remained of this text$TOKENcd into your local copy of the zellij repository.cargo/config.toml like this:
[registries]
ktra = { index = "https://$INDEX_REPO" }
Cargo.toml in the zellij repo to retrieve the individual
zellij subcrates from the private registry:
zellij-utils = { path = "../zellij-utils/", version = "XXX" }
zellij-utils = { path = "../zellij-utils/", version = "XXX", registry = "ktra" }
zellij-client,
zellij-server, ... You can ignore the plugins, because these aren't
released as sources.~/.cargo/config.toml with the following content:
[registries.ktra]
index = "https://$INDEX_REPO"
ktra, the registry server: cargo install ktraktra named ktra.toml there with the
following content:
[index_config]
remote_url = "https://$INDEX_REPO"
https_username = "your-git-username"
https_password = "$TOKEN"
branch = "main" # Or whatever branch name you used
RUST_LOG=debug ktraktra (The details don't really matter, unless
you want to reuse this registry):
curl -X POST -H 'Content-Type: application/json' -d '{"password":"PASSWORD"}' http://localhost:8000/ktra/api/v1/new_user/ALICE
cargo login --registry ktra "KTRA_TOKEN"
zellij repo, remove all configured remotes that allow you to
push/publish directly to the zellij main GitHub repo. Setup a fork of
the main zellij repo instead and configure a remote that allows you to
push/publish to that. Please, this is very important.[registry] section in ~/.cargo/credentials to
prevent accidentally pushing a new release to crates.io.cargo x publish --git-remote <YOUR_ZELLIJ_FORK> --cargo-registry ktra
ktra registry!$ cargo install --registry ktra --root /tmp zellij
$ /tmp/bin/zellij
[registry] section in ~/.cargo/config.toml$ git reset --hard HEAD~1
$ git push --force <YOUR_ZELLIJ_FORK>
$ git tag -d "vX.Y.Z"
$ git push <YOUR_ZELLIJ_FORK> --force --delete "vX.Y.Z"
You're done! :tada: