Repository for the developer documentation of Linera hosted on https://linera.dev
git submodule update --init
To discard local changes to the submodule (the equivalent of git checkout -f HEAD
for
files), use git submodule update
.
To commit local changes, use git commit -a
as usual.
IMPORTANT: The HEAD of linera-protocol should be a commit hash (not a branch name).
The complete workflow may look like this:
# Update the files `RELEASE_BRANCH` and `RELEASE_VERSION` to desired release branch and
# release version of linera-protocol:
# echo devnet_YYYY_MM_DD > RELEASE_BRANCH
# echo 0.M.N > RELEASE_VERSION
# cat RELEASE_BRANCH | sed 's/_/-/g' > RELEASE_DOMAIN
REMOTE_BRANCH="origin/$(cat RELEASE_BRANCH)"
cd linera-protocol
git fetch origin
git checkout $(git rev-parse $REMOTE_BRANCH)
cargo clean
cargo build --locked -p linera-sdk --features test,wasmer
cd ..
mdbook test -L linera-protocol/target/debug/deps
git commit -a
cargo install mdbook
mdbook serve
Then, open the URL as instructed.
This repository is formatted with prettier. To install prettier run npm install -g prettier
. To use prettier run prettier --write src
. The repository is automatically
checked for formatting in CI.