This file contains quick reminders and notes on how to package Sonic.
We consider here the packaging flow of Sonic version 1.0.0
, for target architecture x86_64
and distribution debian9
:
-
How to bump Sonic version before a release:
- Bump version in
Cargo.toml
to1.0.0
- Execute
cargo update
to bumpCargo.lock
- Update the
CHANGELOG.md
file
- Bump version in
-
How to build Sonic for Linux on Debian:
apt-get install -y git build-essential clang
curl https://sh.rustup.rs -sSf | sh
(install thestable
toolchain)git clone https://github.com/valeriansaliou/sonic.git
cd sonic/
cargo build --release
-
How to package built binary and release it on GitHub:
mkdir sonic
mv target/release/sonic sonic/
strip sonic/sonic
cp -r config.cfg sonic/
tar -czvf v1.0.0-x86_64-debian9.tar.gz sonic
rm -r sonic/
- Publish the archive on the releases page on GitHub
-
How to update Crates:
- Publish package on Crates:
cargo publish
- Publish package on Crates:
-
How to update Docker:
docker build .
docker tag [DOCKER_IMAGE_ID] valeriansaliou/sonic:v1.0.0
(insert the built image identifier)docker push valeriansaliou/sonic:v1.0.0