forked from FroSteel/Planification
Distribution: firefox-updates.json + CLAUDE.md (workflow Claude) + nettoyage secrets
- firefox-updates.json à la racine : manifest auto-update Firefox avec entrées v2026.5.40 et v2026.5.41 (sha256 NON SIGNÉ pour le moment, à remplacer par celui des .xpi signés AMO). - build.sh : maintient firefox-updates.json automatiquement à chaque build (ajoute ou met à jour l'entrée de la version courante avec son sha256 calculé sur le .xpi produit). - CLAUDE.md : workflow complet pour Claude Code (build → test → push → wiki → signature AMO). Token Gitea jamais dans le fichier (stocké hors repo en mémoire Claude .claude/projects/.../memory/gitea_token.md). - .gitignore : ajout _archives/, .claude/, .env, *.token, secrets.json. - README.md / CHANGELOG.md : retrait email auteur en clair (renvoi vers page wiki Contact, email obfusqué en entités HTML).
This commit is contained in:
+16
@@ -38,3 +38,19 @@ tmp/
|
|||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
test-output/
|
test-output/
|
||||||
|
|
||||||
|
# Archives historiques locales (jamais sur Gitea)
|
||||||
|
_archives/
|
||||||
|
Old.zip
|
||||||
|
Old/
|
||||||
|
|
||||||
|
# Mémoire / config Claude Code (ne jamais commit, contient potentiellement
|
||||||
|
# des tokens, des notes user, etc.)
|
||||||
|
.claude/
|
||||||
|
CLAUDE.local.md
|
||||||
|
|
||||||
|
# Variables d'environnement / secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
*.token
|
||||||
|
secrets.json
|
||||||
|
|||||||
+1
-1
@@ -352,4 +352,4 @@
|
|||||||
|
|
||||||
**FroSteel** (FRS)
|
**FroSteel** (FRS)
|
||||||
Technicien DGNSI — Canton de Vaud
|
Technicien DGNSI — Canton de Vaud
|
||||||
Contact : `personne-fictive-35@vd.ch`
|
Contact : voir [page wiki Contact](https://gitea.netaplaid.ch/FroSteel/Planification/wiki/Contact)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Extension Chrome / Firefox pour visualiser de manière claire et rapide le plann
|
|||||||
- **Cible** : techniciens DGNSI (Canton de Vaud), EasyVista (`itsma.etat-de-vaud.ch` / `itsma.vd.ch`)
|
- **Cible** : techniciens DGNSI (Canton de Vaud), EasyVista (`itsma.etat-de-vaud.ch` / `itsma.vd.ch`)
|
||||||
- **Démarrage projet** : jeudi 16 avril 2026
|
- **Démarrage projet** : jeudi 16 avril 2026
|
||||||
- **Version actuelle** : `v2026.5.41`
|
- **Version actuelle** : `v2026.5.41`
|
||||||
- **Contact** : `personne-ficti[email protected]`
|
- **Contact** : voir [page wiki Contact](https://gitea.netaplaid.ch/FroSteel/Planification/wiki/Contact)
|
||||||
- **Manifest** : V3 (Chrome/Edge/Firefox)
|
- **Manifest** : V3 (Chrome/Edge/Firefox)
|
||||||
- **Format** : `.zip` (Chromium) + `.xpi` signé (Firefox)
|
- **Format** : `.zip` (Chromium) + `.xpi` signé (Firefox)
|
||||||
|
|
||||||
@@ -254,4 +254,4 @@ git push --tags
|
|||||||
|
|
||||||
**FroSteel** (FRS)
|
**FroSteel** (FRS)
|
||||||
Technicien DGNSI — Canton de Vaud
|
Technicien DGNSI — Canton de Vaud
|
||||||
Contact : `personne-ficti[email protected]`
|
Contact : voir [page wiki Contact](https://gitea.netaplaid.ch/FroSteel/Planification/wiki/Contact)
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
# Usage : ./build.sh
|
# Usage : ./build.sh
|
||||||
###############################################################################
|
###############################################################################
|
||||||
set -e
|
set -e
|
||||||
|
# Le script est dans Autres/ — on remonte d'un cran pour se placer à la
|
||||||
|
# racine du projet, où se trouvent src/ et dist/.
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
VERSION=$(python3 -c "import json; print(json.load(open('src/manifest.json'))['version'])")
|
VERSION=$(python3 -c "import json; print(json.load(open('src/manifest.json'))['version'])")
|
||||||
@@ -44,6 +46,44 @@ cd dist/firefox && zip -rq "../planification-v${VERSION}-firefox.xpi" . && cd .
|
|||||||
echo ""
|
echo ""
|
||||||
echo "==> Builds prêts dans dist/"
|
echo "==> Builds prêts dans dist/"
|
||||||
ls -la dist/*.zip dist/*.xpi 2>/dev/null
|
ls -la dist/*.zip dist/*.xpi 2>/dev/null
|
||||||
|
|
||||||
|
# ---- firefox-updates.json : ajout/mise à jour de l'entrée pour cette version
|
||||||
|
# (sha256 du .xpi NON SIGNÉ — sera remplacé par celui du .xpi signé après AMO).
|
||||||
|
python3 - <<EOF
|
||||||
|
import json, hashlib, os
|
||||||
|
xpi = f"dist/planification-v${VERSION}-firefox.xpi"
|
||||||
|
with open(xpi, 'rb') as f: sha = hashlib.sha256(f.read()).hexdigest()
|
||||||
|
|
||||||
|
JSON_PATH = "firefox-updates.json"
|
||||||
|
ADDON_ID = "[email protected]"
|
||||||
|
update_link = f"https://gitea.netaplaid.ch/FroSteel/Planification/releases/download/v${VERSION}/planification-v${VERSION}-firefox.xpi"
|
||||||
|
|
||||||
|
if os.path.exists(JSON_PATH):
|
||||||
|
with open(JSON_PATH) as f: data = json.load(f)
|
||||||
|
else:
|
||||||
|
data = {"addons": {ADDON_ID: {"updates": []}}}
|
||||||
|
|
||||||
|
addon = data.setdefault("addons", {}).setdefault(ADDON_ID, {"updates": []})
|
||||||
|
updates = addon.setdefault("updates", [])
|
||||||
|
|
||||||
|
# Retirer toute entrée existante pour cette version (idempotent)
|
||||||
|
updates = [u for u in updates if u.get("version") != "${VERSION}"]
|
||||||
|
# Ajouter en tête
|
||||||
|
updates.insert(0, {
|
||||||
|
"version": "${VERSION}",
|
||||||
|
"update_link": update_link,
|
||||||
|
"update_hash": "sha256:" + sha,
|
||||||
|
})
|
||||||
|
addon["updates"] = updates
|
||||||
|
|
||||||
|
with open(JSON_PATH, 'w') as f:
|
||||||
|
json.dump(data, f, indent=2, ensure_ascii=False)
|
||||||
|
f.write('\n')
|
||||||
|
|
||||||
|
print(f" ✓ firefox-updates.json mis à jour (sha256 NON SIGNÉ : {sha[:16]}…)")
|
||||||
|
EOF
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Pour Chrome : charger dist/chromium/ en mode développeur"
|
echo "Pour Chrome : charger dist/chromium/ en mode développeur"
|
||||||
echo "Pour Firefox : signer dist/planification-v${VERSION}-firefox.xpi sur AMO"
|
echo "Pour Firefox : signer dist/planification-v${VERSION}-firefox.xpi sur AMO"
|
||||||
|
echo " Après signature, remplacer le sha256 dans firefox-updates.json par celui du .xpi signé."
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"addons": {
|
||||||
|
"[email protected]": {
|
||||||
|
"updates": [
|
||||||
|
{
|
||||||
|
"version": "2026.5.41",
|
||||||
|
"update_link": "https://gitea.netaplaid.ch/FroSteel/Planification/releases/download/v2026.5.41/planification-v2026.5.41-firefox.xpi",
|
||||||
|
"update_hash": "sha256:9d92ef930e4d5f8da06817b04ea449f0091e413377a72390fa191d05849bf336"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "2026.5.40",
|
||||||
|
"update_link": "https://gitea.netaplaid.ch/FroSteel/Planification/releases/download/v2026.5.40/planification-v2026.5.40-firefox.xpi",
|
||||||
|
"update_hash": "sha256:2ba0758960b931f4211c613c75bbf21b3a250572dddc70d854ff1ecca3220421"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user