From 20429a85333d08f2b7dae9c433dc9bfee78ed4f7 Mon Sep 17 00:00:00 2001 From: Ellet Date: Wed, 29 May 2024 21:45:20 +0300 Subject: [PATCH] chore(scripts): add todos to refactor the sh scripts to dart from sh to allow windows developers use them easily without git bash or something else --- scripts/before_push.sh | 10 ++++++++++ scripts/disable_local_dev.sh | 2 ++ scripts/enable_local_dev.sh | 2 ++ scripts/pub_get.sh | 3 +++ scripts/regenerate_translations.sh | 2 ++ 5 files changed, 19 insertions(+) diff --git a/scripts/before_push.sh b/scripts/before_push.sh index f5aac35c..c3722f85 100755 --- a/scripts/before_push.sh +++ b/scripts/before_push.sh @@ -1,5 +1,9 @@ #!/bin/bash +# The script must be run from the root project folder and not inside the scripts + +# TODO: Refactor this to a dart script to allow developers who use Windows to use it + # Run Flutter analyze echo "Running 'flutter analyze'..." flutter analyze @@ -30,4 +34,10 @@ echo "Running flutter build web --release --dart-define=CI=true." echo "" +# Check the translations +echo "Running dart ./scripts/ensure_translations_correct.dart" +(dart ./scripts/ensure_translations_correct.dart) + +echo "" + echo "Script completed." diff --git a/scripts/disable_local_dev.sh b/scripts/disable_local_dev.sh index 20ef62ab..2bca0b16 100755 --- a/scripts/disable_local_dev.sh +++ b/scripts/disable_local_dev.sh @@ -2,6 +2,8 @@ # Please make sure to run this script in the root directory of the repository and not inside sub-folders +# TODO: Refactor this to a dart script to allow developers who use Windows to use it + echo "" echo "Disable local development for flutter_quill..." diff --git a/scripts/enable_local_dev.sh b/scripts/enable_local_dev.sh index 3e390d53..6be69682 100755 --- a/scripts/enable_local_dev.sh +++ b/scripts/enable_local_dev.sh @@ -2,6 +2,8 @@ # Please make sure to run this script in the root directory of the repository and not inside sub-folders +# TODO: Refactor this to a dart script to allow developers who use Windows to use it + echo "" echo "Enable local development for flutter_quill..." diff --git a/scripts/pub_get.sh b/scripts/pub_get.sh index bf13c197..947693df 100644 --- a/scripts/pub_get.sh +++ b/scripts/pub_get.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash + +# TODO: Refactor this to a dart script to allow developers who use Windows to use it + flutter pub get (cd dart_quill_delta && flutter pub get) (cd flutter_quill_extensions && flutter pub get) diff --git a/scripts/regenerate_translations.sh b/scripts/regenerate_translations.sh index 8e1583bf..921863c2 100755 --- a/scripts/regenerate_translations.sh +++ b/scripts/regenerate_translations.sh @@ -4,6 +4,8 @@ # ./scripts/regenerate_translations.sh # otherwise the script could delete the wrong folder in rare cases +# TODO: Refactor this to a dart script to allow developers who use Windows to use it + echo "" echo "Delete the current generated localizations..."