Création DemoCuisine
This commit is contained in:
BIN
Excel/backup/Demo_Cuisine_Vers1.0.2.xlsm
Normal file
BIN
Excel/backup/Demo_Cuisine_Vers1.0.2.xlsm
Normal file
Binary file not shown.
BIN
Excel/backup/Ratio_Restauration_Vers1.0.48.xlsm
Normal file
BIN
Excel/backup/Ratio_Restauration_Vers1.0.48.xlsm
Normal file
Binary file not shown.
BIN
Excel/prod/Demo_Cuisine.xlsm
Normal file
BIN
Excel/prod/Demo_Cuisine.xlsm
Normal file
Binary file not shown.
2
Excel/prod/Demo_Cuisine_VERSION.txt
Normal file
2
Excel/prod/Demo_Cuisine_VERSION.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
1.0.3
|
||||
2025-12-09
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
1.0.48
|
||||
1.0.49
|
||||
2025-12-08
|
||||
|
||||
70
Scripts/Maj_prod_DemoCuisine.bat
Normal file
70
Scripts/Maj_prod_DemoCuisine.bat
Normal file
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user