diff --git a/Excel/backup/Demo_Cuisine_Vers1.0.2.xlsm b/Excel/backup/Demo_Cuisine_Vers1.0.2.xlsm new file mode 100644 index 0000000..018c7cd Binary files /dev/null and b/Excel/backup/Demo_Cuisine_Vers1.0.2.xlsm differ diff --git a/Excel/backup/Ratio_Restauration_Vers1.0.48.xlsm b/Excel/backup/Ratio_Restauration_Vers1.0.48.xlsm new file mode 100644 index 0000000..9c76a2a Binary files /dev/null and b/Excel/backup/Ratio_Restauration_Vers1.0.48.xlsm differ diff --git a/Excel/prod/Demo_Cuisine.xlsm b/Excel/prod/Demo_Cuisine.xlsm new file mode 100644 index 0000000..018c7cd Binary files /dev/null and b/Excel/prod/Demo_Cuisine.xlsm differ diff --git a/Excel/prod/Demo_Cuisine_VERSION.txt b/Excel/prod/Demo_Cuisine_VERSION.txt new file mode 100644 index 0000000..fe1b782 --- /dev/null +++ b/Excel/prod/Demo_Cuisine_VERSION.txt @@ -0,0 +1,2 @@ +1.0.3 +2025-12-09 diff --git a/Excel/prod/Ratio_Cuisine.xlsm b/Excel/prod/Ratio_Cuisine.xlsm index b3bbd34..87900e7 100644 Binary files a/Excel/prod/Ratio_Cuisine.xlsm and b/Excel/prod/Ratio_Cuisine.xlsm differ diff --git a/Excel/prod/Ratio_Restauration.xlsm b/Excel/prod/Ratio_Restauration.xlsm index 3afa11d..f608a54 100644 Binary files a/Excel/prod/Ratio_Restauration.xlsm and b/Excel/prod/Ratio_Restauration.xlsm differ diff --git a/Excel/prod/Ratio_Restauration_VERSION.txt b/Excel/prod/Ratio_Restauration_VERSION.txt index a239adf..10340a9 100644 --- a/Excel/prod/Ratio_Restauration_VERSION.txt +++ b/Excel/prod/Ratio_Restauration_VERSION.txt @@ -1,2 +1,2 @@ -1.0.48 +1.0.49 2025-12-08 diff --git a/Scripts/Maj_prod_DemoCuisine.bat b/Scripts/Maj_prod_DemoCuisine.bat new file mode 100644 index 0000000..dcdf3bb --- /dev/null +++ b/Scripts/Maj_prod_DemoCuisine.bat @@ -0,0 +1,70 @@ +@echo off +setlocal ENABLEDELAYEDEXPANSION + +REM --- Se place dans le dossier du .bat --- +cd /d "%~dp0" + +REM Chemin du fichier de version pour la CUISINE +set "VERSION_FILE=..\Excel\prod\Demo_Cuisine_VERSION.txt" + +REM On lit l'ANCIENNE version avant de la mettre à jour (pour nommer la sauvegarde) +set "OLD_VERSION=" +if exist "%VERSION_FILE%" ( + set /p OLD_VERSION=<"%VERSION_FILE%" +) + +echo Mise à jour de version... +python "maj_version.py" "%VERSION_FILE%" +if errorlevel 1 ( + echo ERREUR lors de la mise à jour de version. + pause + exit /b 1 +) + +REM === 2) CHEMINS DES FICHIERS EXCEL === +set SRC=..\Excel\dev\Demo_Cuisine_dev.xlsm +set DST_DIR=..\Excel\prod + +REM Dossier commun de sauvegardes (Cuisine + Restauration) +set BACKUP_DIR=..\Excel\backup + +REM Vérifications +if not exist "%SRC%" ( + echo ERREUR : fichier source introuvable : + echo %SRC% + pause + exit /b 1 +) + +if not exist "%DST_DIR%" ( + echo ERREUR : dossier de destination introuvable : + echo %DST_DIR% + pause + exit /b 1 +) + +REM Création auto du dossier de sauvegarde s'il n'existe pas +if not exist "%BACKUP_DIR%" ( + mkdir "%BACKUP_DIR%" +) + +REM === 3) NOM DU FICHIER DE SAUVEGARDE AVEC ANCIENNE VERSION === +if "%OLD_VERSION%"=="" ( + REM Sécurité : si on n'a pas réussi à lire la version, on met un nom générique + set "BACKUP=%BACKUP_DIR%\Demo_Cuisine_sansVersion.xlsm" +) else ( + set "BACKUP=%BACKUP_DIR%\Demo_Cuisine_Vers%OLD_VERSION%.xlsm" +) + +REM === 4) COPIE VERS PROD === +echo Copie vers la version de production... +copy /Y "%SRC%" "%DST_DIR%\Demo_Cuisine.xlsm" + +REM === 5) SAUVEGARDE DATÉE === +echo Création de la sauvegarde datée... +copy /Y "%SRC%" "%BACKUP%" + +echo Terminé. +exit /b 0 + +