v0.4.1 : Phase 1 complete (17/17) - dashboard TUI (#33), favoris/notes/tags (#39), profils d'environnement (#40), completions dynamiques + man pages (#41), packaging officiel + CI (#42), self-update Gitea, state v3, 212 tests
This commit is contained in:
+72
-30
@@ -1,62 +1,104 @@
|
||||
# Publier une release
|
||||
|
||||
Les installateurs one-liner (`install.sh` et `install.ps1`) téléchargent
|
||||
les binaires attachés à la **dernière release** du dépôt Gitea
|
||||
Les installateurs one-liner (`install.sh` et `install.ps1`), la commande
|
||||
`am self-update` et les paquets (scoop/winget/homebrew) consomment les
|
||||
**artefacts attachés à la dernière release** du dépôt Gitea
|
||||
(https://git.dracodev.net/Projets/agent-manager). Sans binaire pour la
|
||||
plateforme, ils retombent sur `cargo install --git` (plus lent mais toujours
|
||||
fonctionnel).
|
||||
plateforme, les installateurs retombent sur `cargo install --git`.
|
||||
|
||||
La phase 1 (v0.4.1) a ajouté le pipeline CI (issue #42) : sur chaque tag
|
||||
`v*`, `.gitea/workflows/release.yml` construit Linux (x86_64 + aarch64
|
||||
musl statiques), Windows (x86_64) et macOS (x86_64 + aarch64) et publie la
|
||||
release. La procédure locale ci-dessous reste disponible pour produire
|
||||
manuellement les mêmes artefacts (ou les plateformes sans runner CI).
|
||||
|
||||
## 1. Bumper la version
|
||||
|
||||
Dans Cargo.toml (ex. `0.2.1`), puis mettre à jour Cargo.lock
|
||||
(`cargo check`) et compiler :
|
||||
Dans Cargo.toml (ex. `0.4.1`), puis `cargo check` pour mettre à jour
|
||||
Cargo.lock, et lancer toute la batterie :
|
||||
|
||||
cargo build --release # binaire Windows (am.exe) sur Windows
|
||||
cargo test --locked # 240+ tests
|
||||
cargo clippy --all-targets -- -D warnings # si possible
|
||||
|
||||
## 2. Produire les binaires et les archives
|
||||
|
||||
### Windows (x86_64) — natif
|
||||
|
||||
scripts/build-release.ps1 # target/release/am.exe -> dist/am-windows-x86_64.zip
|
||||
|
||||
### Linux — binaire STATIQUE (musl), compatible toutes distributions,
|
||||
### y compris Debian 12 (glibc 2.36) — ne JAMAIS publier un binaire glibc
|
||||
### compilé sur une base récente.
|
||||
|
||||
# binaire Linux STATIQUE (musl) : compatible toutes distributions,
|
||||
# y compris Debian 12 (glibc 2.36) — ne JAMAIS publier un binaire glibc
|
||||
# compilé sur une base récente.
|
||||
docker run --rm -v "${PWD}:/work" -w /work -e CARGO_TARGET_DIR=/tmp/target-musl \
|
||||
rust:1.94-alpine sh -c "apk add --no-cache build-base && \
|
||||
rustup target add x86_64-unknown-linux-musl && \
|
||||
rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl && \
|
||||
cargo build --release --locked --target x86_64-unknown-linux-musl && \
|
||||
cp /tmp/target-musl/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64"
|
||||
cargo build --release --locked --target aarch64-unknown-linux-musl && \
|
||||
mkdir -p dist && \
|
||||
cp /tmp/target-musl/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64 && \
|
||||
cp /tmp/target-musl/aarch64-unknown-linux-musl/release/am dist/am-linux-aarch64 && \
|
||||
cd dist && tar -czf am-linux-x86_64.tar.gz am-linux-x86_64 && \
|
||||
tar -czf am-linux-aarch64.tar.gz am-linux-aarch64"
|
||||
|
||||
## 2. Créer les archives des binaires
|
||||
### macOS (x86_64 + aarch64) — via CI (runner macOS) :
|
||||
|
||||
Windows (PowerShell) :
|
||||
# le job 'macos' du workflow release.yml produit :
|
||||
# am-macos-x86_64.tar.gz am-macos-aarch64.tar.gz
|
||||
# (compilation croisée macOS impossible depuis Windows/Linux ; sans
|
||||
# runner macOS, ces archives manquent et l'install.sh compile depuis
|
||||
# les sources sur macOS, ce qui reste fonctionnel.)
|
||||
|
||||
Compress-Archive target\release\am.exe am-windows-x86_64.zip
|
||||
Vérifier chaque archive : `am version` doit répondre, et `am doctor` ne
|
||||
doit signaler aucune dépendance manquante.
|
||||
|
||||
Linux (l'archive doit contenir un fichier nommé « am ») :
|
||||
## 3. Rendre les manifests de packaging (issue #42)
|
||||
|
||||
docker run --rm -v "${PWD}:/work" -w /work rust:1.94-alpine sh -c \
|
||||
"cd dist && cp am-linux-x86_64 am && tar -czf am-linux-x86_64.tar.gz am && rm am"
|
||||
Une fois toutes les archives dans `dist/` :
|
||||
|
||||
## 3. Créer la release sur Gitea
|
||||
scripts/render-manifests.ps1 -Version 0.4.1
|
||||
|
||||
Via l'interface web : Releases > New Release, tag v0.2.0, attacher les
|
||||
archives ci-dessus.
|
||||
Ce script rend, avec la version et les sha256 réels :
|
||||
|
||||
Ou via l'API (jeton Gitea requis) :
|
||||
- `dist/scoop/am.json` → `scoop install dist/scoop/am.json`
|
||||
(ou à ajouter à un bucket ; checkver/autoupdate inclus)
|
||||
- `dist/winget/*.yaml` → à soumettre à microsoft/winget-pkgs
|
||||
(`winget install BrunoDracodev.AgentManager`)
|
||||
- `dist/homebrew/am.rb` → à servir via un tap, ou à soumettre
|
||||
- `dist/rpm/am.spec` → rpmbuild -bb (avec am-linux-x86_64.tar.gz
|
||||
dans ~/rpmbuild/SOURCES)
|
||||
- Paquet deb : `packaging/deb/make-deb.sh 0.4.1` → dist/am_0.4.1_amd64.deb
|
||||
|
||||
## 4. Créer la release sur Gitea
|
||||
|
||||
Via l'interface web : Releases > New Release, tag v0.4.1, attacher les
|
||||
archives. Ou via l'API (jeton Gitea requis) :
|
||||
|
||||
curl -X POST -H "Authorization: token <JETON>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"tag_name":"v0.2.0","name":"v0.2.0","body":"notes de version"}' \
|
||||
-d '{"tag_name":"v0.4.1","name":"v0.4.1","body":"notes de version"}' \
|
||||
https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases
|
||||
|
||||
curl -X POST -H "Authorization: token <JETON>" \
|
||||
-F "attachment=@am-windows-x86_64.zip" \
|
||||
-F "attachment=@dist/am-windows-x86_64.zip" \
|
||||
https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases/<id>/assets?name=am-windows-x86_64.zip
|
||||
|
||||
curl -X POST -H "Authorization: token <JETON>" \
|
||||
-F "attachment=@am-linux-x86_64.tar.gz" \
|
||||
https://git.dracodev.net/api/v1/repos/Projets/agent-manager/releases/<id>/assets?name=am-linux-x86_64.tar.gz
|
||||
# idem pour am-linux-x86_64.tar.gz, am-linux-aarch64.tar.gz,
|
||||
# am-macos-x86_64.tar.gz, am-macos-aarch64.tar.gz (si CI) et
|
||||
# checksums.txt.
|
||||
|
||||
## 4. Tag git
|
||||
## 5. Tag git (déclenche aussi le pipeline CI)
|
||||
|
||||
git tag v0.2.0 && git push origin v0.2.0
|
||||
git tag v0.4.1 && git push origin v0.4.1
|
||||
|
||||
## Conventions de nommage (attendues par les installateurs et self-update)
|
||||
|
||||
Les conventions de nommage attendues par les installateurs :
|
||||
- am-windows-x86_64.zip (contient am.exe)
|
||||
- am-linux-x86_64.tar.gz (contient am)
|
||||
- am-linux-aarch64.tar.gz (contient am)
|
||||
- am-macos-x86_64.tar.gz / am-macos-aarch64.tar.gz (contiennent am)
|
||||
|
||||
## Vérification finale
|
||||
|
||||
am self-update --check # doit annoncer la nouvelle version
|
||||
am self-update # met à jour le binaire courant
|
||||
|
||||
Reference in New Issue
Block a user