From 8f6c17f0f2dae33559547e3ee7cf79051ac6ece0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drix?= Date: Fri, 15 May 2026 09:55:16 +0200 Subject: [PATCH] chore : version 1.5.0, push.sh bloque main, CHANGELOG Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 13 +++++++++++++ public/version.txt | 2 +- scripts/push.sh | 15 ++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e217f0d..21927fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.0.0/) — versionnag --- +## [1.5.0] - 2026-05-15 + +### Ajouté +- Admin → Site : configuration de l'URL du dépôt Folio et de la branche suivie pour les mises à jour, sans modifier le `.env` (`folio_repo_url`, `folio_update_branch` dans `site_settings.json`) +- `APP_TIMEZONE` : fuseau horaire configurable via `.env` (défaut `Europe/Paris`), appliqué globalement dans `bootstrap.php` + +### Corrigé +- Bouton « Vérifier » masqué avec message explicatif si `FOLIO_REPO_URL` n'est pas configuré (ni dans `.env` ni dans l'admin) +- `FOLIO_REPO_URL` et `FOLIO_UPDATE_BRANCH` documentés dans `.env.example` +- `scripts/push.sh` : ne pousse plus directement sur `main` — pousse sur la branche courante pour forcer le passage par une PR + +--- + ## [1.4.0] - 2026-05-15 ### Ajouté diff --git a/public/version.txt b/public/version.txt index 88c5fb8..bc80560 100644 --- a/public/version.txt +++ b/public/version.txt @@ -1 +1 @@ -1.4.0 +1.5.0 diff --git a/scripts/push.sh b/scripts/push.sh index 849305c..3bc618f 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# Pousse le code Folio vers git.abonnel.fr/cedricAbonnel/folio +# Pousse la branche courante vers git.abonnel.fr/cedricAbonnel/folio +# Ne pousse JAMAIS directement sur main — passer par une PR. # Usage : ./scripts/push.sh "message de commit" set -euo pipefail @@ -20,6 +21,13 @@ if [ ! -d .git ]; then echo "→ Dépôt git initialisé" fi +BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [[ "$BRANCH" == "main" ]]; then + echo "✗ Refus de pousser directement sur main." + echo " Créer une branche feature : git checkout -b feat/nom" + exit 1 +fi + # Extraire la version depuis CHANGELOG.md (première entrée ## [X.Y.Z]) FOLIO_VERSION=$(grep -m1 '^\#\# \[[0-9]' CHANGELOG.md | sed 's/.*\[\([^]]*\)\].*/\1/') if [[ -z "$FOLIO_VERSION" ]]; then @@ -32,5 +40,6 @@ echo "→ Version : $FOLIO_VERSION" git add -A git diff --cached --quiet && echo "(rien à committer)" && exit 0 git commit -m "$MSG" -git push origin main -echo "✓ Poussé vers folio" +git push origin "$BRANCH" +echo "✓ Poussé vers folio (branche $BRANCH)" +echo " → Ouvrir une PR sur https://git.abonnel.fr/cedricAbonnel/folio/pulls/new/$BRANCH"