diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34fa390..85ecc16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,18 @@ CI runs on Linux only (Gitea has one runner); run these before pushing — almos Live capture exists only on Linux (`AF_PACKET` + netlink); the code behind Windows and macOS paths still compiles and is covered by `cargo check`, but neither runs in CI nor is built for release. +## Releases + +Pushing a `v*` tag makes the Gitea CI create the release (notes come from `CHANGELOG.md`, so update it first) and attach the Linux CLI (x86_64 and aarch64) and the desktop app for Linux **aarch64** and Windows. The runner is arm64, so the Linux **x86_64** desktop app comes from an x86_64 Linux machine: + +```bash +scripts/build-gui.sh linux # AppImage + .deb in dist-gui/ +API=https://git.lucasrguerra.dev.br/api/v1/repos/lucasrguerra/sabia TOKEN=... \ + scripts/release-upload.sh vX.Y.Z dist-gui/* +``` + +There is no macOS build: it needs Apple's SDK and code signing, which a Linux runner cannot provide. + ## Where to work Module map in [docs/architecture.md](docs/architecture.md). What's missing and welcome is in the [ROADMAP](ROADMAP.md). diff --git a/CONTRIBUTING.pt-BR.md b/CONTRIBUTING.pt-BR.md index b042ea2..bcf03de 100644 --- a/CONTRIBUTING.pt-BR.md +++ b/CONTRIBUTING.pt-BR.md @@ -21,6 +21,18 @@ O CI roda só em Linux (o Gitea tem um único runner); rode esses comandos antes A captura ao vivo só existe no Linux (`AF_PACKET` + netlink); o código dos caminhos de Windows e macOS continua compilando e é coberto pelo `cargo check`, mas não roda no CI nem é compilado para release. são offline. +## Releases + +Enviar uma tag `v*` faz o CI do Gitea criar a release (as notas vêm do `CHANGELOG.md`, então atualize-o antes) e anexar o CLI para Linux (x86_64 e aarch64) e o app desktop para Linux **aarch64** e Windows. O runner é arm64, então o app Linux **x86_64** vem de uma máquina Linux x86_64: + +```bash +scripts/build-gui.sh linux # AppImage + .deb em dist-gui/ +API=https://git.lucasrguerra.dev.br/api/v1/repos/lucasrguerra/sabia TOKEN=... \ + scripts/release-upload.sh vX.Y.Z dist-gui/* +``` + +Não há build para macOS: ele exige o SDK e a assinatura da Apple, que um runner Linux não tem. + ## Onde mexer Mapa dos módulos em [docs/pt-BR/arquitetura.md](docs/pt-BR/arquitetura.md). O que falta e o que é bem-vindo está no [ROADMAP](ROADMAP.pt-BR.md). diff --git a/scripts/build-gui.sh b/scripts/build-gui.sh index 30a0dfc..137fec4 100755 --- a/scripts/build-gui.sh +++ b/scripts/build-gui.sh @@ -41,7 +41,7 @@ cd apps/gui/src-tauri case "$platform" in linux) tauri build --bundles appimage,deb - bundle=target/release/bundle + bundle="${CARGO_TARGET_DIR:-target}/release/bundle" cp "$bundle"/appimage/*.AppImage "$bundle"/deb/*.deb ../../../dist-gui/ # O atualizador do Tauri (quando o projeto usa) precisa do .sig ao lado. cp "$bundle"/appimage/*.AppImage.sig ../../../dist-gui/ 2>/dev/null || true @@ -49,7 +49,7 @@ case "$platform" in windows) rustup target add x86_64-pc-windows-msvc >/dev/null tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc --bundles nsis - bundle=target/x86_64-pc-windows-msvc/release/bundle/nsis + bundle="${CARGO_TARGET_DIR:-target}/x86_64-pc-windows-msvc/release/bundle/nsis" cp "$bundle"/*-setup.exe ../../../dist-gui/ cp "$bundle"/*-setup.exe.sig ../../../dist-gui/ 2>/dev/null || true ;;