From eef1fc8d32a3a40c6aea1e4fa83b7c604491e483 Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 26 Jan 2026 12:30:40 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Format=20semver=20YY.MM.DDNN=20pour=20co?= =?UTF-8?q?mpatibilit=C3=A9=20Dart/Flutter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Correction format version pour pubspec.yaml: YY.MM.DDNN - VERSION file garde format lisible: 26.01.26.03 - pubspec.yaml reçoit format semver: 26.01.2603+26012603 - Concat DD+NN pour 3ème partie: 26+03 = 2603 - Build number complet: 26012603 Résout erreur: Could not parse '26.01.26.03+26012603' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/deploy-app.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/deploy-app.sh b/app/deploy-app.sh index 6af77396..54f14f5d 100755 --- a/app/deploy-app.sh +++ b/app/deploy-app.sh @@ -169,6 +169,9 @@ if [ "$SOURCE_TYPE" = "local_build" ]; then # Date du jour au format YY.MM.DD TODAY=$(date +%y.%m.%d) + TODAY_YY=$(date +%y) + TODAY_MM=$(date +%m) + TODAY_DD=$(date +%d) if [ -f ../VERSION ]; then CURRENT_VERSION=$(cat ../VERSION | tr -d '\n\r' | tr -d ' ') @@ -199,15 +202,20 @@ if [ "$SOURCE_TYPE" = "local_build" ]; then echo_warning "VERSION file not found, creating new one" fi - # Construire la nouvelle version complète + # Construire la version complète YY.MM.DD.NN pour le fichier VERSION VERSION="${TODAY}.${NEW_BUILD}" echo "$VERSION" > ../VERSION echo_success "✅ New version: $VERSION" - # Génération du build number et mise à jour du pubspec.yaml - BUILD_NUMBER=$(echo $VERSION | tr -d '.') - FULL_VERSION="${VERSION}+${BUILD_NUMBER}" - echo_info "Full version for pubspec.yaml: $FULL_VERSION" + # Version semver compatible: YY.MM.DDNN (3 parties) + SEMVER_VERSION="${TODAY_YY}.${TODAY_MM}.${TODAY_DD}${NEW_BUILD}" + + # Build number: YYMMDDNN (tous les chiffres) + BUILD_NUMBER="${TODAY_YY}${TODAY_MM}${TODAY_DD}${NEW_BUILD}" + + # Version complète pour pubspec.yaml + FULL_VERSION="${SEMVER_VERSION}+${BUILD_NUMBER}" + echo_info "Semver version for pubspec.yaml: $FULL_VERSION" sed -i "s/^version: .*/version: $FULL_VERSION/" pubspec.yaml || echo_error "Failed to update pubspec.yaml"