11#! /bin/bash
22
3- # Script de release automatique
3+ # Automatic release script
44# Usage: ./release.sh 1.2.3
55
66if [ $# -eq 0 ]; then
77 echo " ❌ Usage: $0 <version>"
8- echo " Exemple : $0 1.2.3"
8+ echo " Example : $0 1.2.3"
99 exit 1
1010fi
1111
1212NEW_VERSION=" $1 "
1313
14- # Détecter automatiquement la version actuelle depuis package.json
14+ # Automatically detect the current version from package.json
1515CURRENT_VERSION=$( grep ' "version"' package.json | head -1 | sed ' s/.*"version": "\(.*\)".*/\1/' )
1616
17- echo " 🚀 Release automatique : $CURRENT_VERSION → $NEW_VERSION "
17+ echo " 🚀 Automatic release : $CURRENT_VERSION → $NEW_VERSION "
1818
19- # Vérifier que nous sommes dans le bon répertoire
19+ # Verify that we are in the correct directory
2020if [ ! -f " package.json" ] || [ ! -f " src-tauri/Cargo.toml" ]; then
21- echo " ❌ Erreur: Exécutez le script depuis la racine du projet "
21+ echo " ❌ Error: Run the script from the project root "
2222 exit 1
2323fi
2424
25- echo " 📝 Mise à jour des versions dans tous les fichiers ..."
25+ echo " 📝 Updating versions in all files ..."
2626
2727# 1. package.json
2828sed -i " s/\" version\" : \" $CURRENT_VERSION \" /\" version\" : \" $NEW_VERSION \" /g" package.json
@@ -44,39 +44,39 @@ sed -i "s/>v$CURRENT_VERSION</>v$NEW_VERSION</g" src/app/shared/components/foote
4444# 6. setup.sh
4545sed -i " s/git tag v$CURRENT_VERSION /git tag v$NEW_VERSION /g" setup.sh
4646
47- # 7. Mettre à jour Cargo.lock
48- echo " 🔧 Mise à jour de Cargo.lock..."
47+ # 7. Update Cargo.lock
48+ echo " 🔧 Updating Cargo.lock..."
4949cd src-tauri
5050cargo update
5151cd ..
5252
53- echo " ✅ Toutes les versions ont été mises à jour "
53+ echo " ✅ All versions have been updated "
5454
55- # Vérifier les changements
56- echo " 📋 Fichiers modifiés :"
55+ # Verify changes
56+ echo " 📋 Modified files :"
5757git diff --name-only
5858
59- echo " 🤔 Voulez-vous continuer avec le commit et le tag ? (y/N)"
59+ echo " 🤔 Do you want to proceed with the commit and tag ? (y/N)"
6060read -r response
6161if [[ " $response " =~ ^([yY][eE][sS]| [yY])$ ]]; then
6262 # Commit
63- echo " 💾 Commit des modifications ..."
63+ echo " 💾 Committing changes ..."
6464 git add .
6565 git commit -m " chore: bump version to $NEW_VERSION "
6666
6767 # Tag
68- echo " 🏷️ Création du tag v$NEW_VERSION ..."
68+ echo " 🏷️ Creating tag v$NEW_VERSION ..."
6969 git tag " v$NEW_VERSION "
7070
71- echo " 🎉 Release $NEW_VERSION prête !"
71+ echo " 🎉 Release $NEW_VERSION is ready !"
7272 echo " "
73- echo " 📤 Pour publier :"
73+ echo " 📤 To publish :"
7474 echo " git push origin main --tags"
7575 echo " "
76- echo " 🤖 GitHub Actions va automatiquement :"
77- echo " • Compiler l' app"
78- echo " • Créer la release"
79- echo " • Générer les mises à jour OTA"
76+ echo " 🤖 GitHub Actions will automatically :"
77+ echo " • Build the app"
78+ echo " • Create the release"
79+ echo " • Generate OTA updates "
8080else
81- echo " ❌ Annulé. Vous pouvez annuler les modifications avec : git checkout ."
81+ echo " ❌ Canceled. You can undo changes with : git checkout ."
8282fi
0 commit comments