From ce4f4cbbf03e1e46043f7e3aff2dc2f61e925fca Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 23 Jun 2023 18:46:38 +0200 Subject: [PATCH 1/2] tool: cleanup mono_repo remains --- mono_repo.yaml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 mono_repo.yaml diff --git a/mono_repo.yaml b/mono_repo.yaml deleted file mode 100644 index 7e6e53e0..00000000 --- a/mono_repo.yaml +++ /dev/null @@ -1,8 +0,0 @@ -github: - on: - push: - branches: - - main - pull_request: - -self_validate: true From bd5f80c13552268ea4a026442cb59356a7ca0326 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 23 Jun 2023 18:46:34 +0200 Subject: [PATCH 2/2] tool: melos handle l10n, build_runner and formatting --- melos.yaml | 3 +++ packages/neon/neon/build.yaml | 0 tool/format.sh | 8 -------- tool/generate-app.sh | 3 --- tool/generate-localizations.sh | 14 -------------- tool/generate-neon.sh | 6 +++--- tool/generate-nextcloud.sh | 4 ++-- 7 files changed, 8 insertions(+), 30 deletions(-) create mode 100644 packages/neon/neon/build.yaml delete mode 100755 tool/format.sh delete mode 100755 tool/generate-localizations.sh diff --git a/melos.yaml b/melos.yaml index aa7b8315..cd523589 100644 --- a/melos.yaml +++ b/melos.yaml @@ -19,6 +19,9 @@ ide: enabled: false scripts: + format: dart format --fix --line-length 120 . format-check: dart format --output=none --set-exit-if-changed --line-length 120 . analyze: dart analyze --fatal-infos . test: melos exec --concurrency=1 --fail-fast --dir-exists=test -- "flutter test --concurrency=$(nproc --all)" + generate:neon:build_runner: melos exec --scope="neon*" --file-exists="build.yaml" -- dart run build_runner build --delete-conflicting-outputs && melos run format + generate:neon:l10n: melos exec --flutter --dir-exists="lib/l10n" flutter gen-l10n && melos run format diff --git a/packages/neon/neon/build.yaml b/packages/neon/neon/build.yaml new file mode 100644 index 00000000..e69de29b diff --git a/tool/format.sh b/tool/format.sh deleted file mode 100755 index c1847cf2..00000000 --- a/tool/format.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -euxo pipefail -cd "$(dirname "$0")/.." - -( - cd packages - fvm dart format --fix --line-length 120 . -) diff --git a/tool/generate-app.sh b/tool/generate-app.sh index 13254944..afa487d4 100755 --- a/tool/generate-app.sh +++ b/tool/generate-app.sh @@ -37,7 +37,4 @@ function export_mipmap_icon_all() { wait fvm dart run flutter_native_splash:create - fvm flutter gen-l10n ) - -./tool/format.sh diff --git a/tool/generate-localizations.sh b/tool/generate-localizations.sh deleted file mode 100755 index e282d3db..00000000 --- a/tool/generate-localizations.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -euxo pipefail -cd "$(dirname "$0")/.." - -for package in packages/neon/*; do - ( - cd "$package" - fvm flutter gen-l10n - ) & -done - -wait - -./tool/format.sh diff --git a/tool/generate-neon.sh b/tool/generate-neon.sh index b80d688d..2cf03d5b 100755 --- a/tool/generate-neon.sh +++ b/tool/generate-neon.sh @@ -33,8 +33,8 @@ copy_nextcloud_app_svg notifications external/nextcloud-notifications # Nextcloud logo wget https://raw.githubusercontent.com/nextcloud/promo/master/nextcloud-logo-inverted.svg -O assets/logo_nextcloud.svg - fvm dart run build_runner build --delete-conflicting-outputs - fvm flutter gen-l10n + melos run generate:neon:build_runner + melos run generate:neon:l10n ) -./tool/format.sh +melos run format diff --git a/tool/generate-nextcloud.sh b/tool/generate-nextcloud.sh index a55880cf..066db4f2 100755 --- a/tool/generate-nextcloud.sh +++ b/tool/generate-nextcloud.sh @@ -66,7 +66,7 @@ jq \ fvm dart pub run build_runner build --delete-conflicting-outputs # For some reason we need to fix and format twice, otherwise not everything gets fixed fvm dart fix --apply lib/src/nextcloud.openapi.dart - ../../tool/format.sh + melos run format fvm dart fix --apply lib/src/nextcloud.openapi.dart - ../../tool/format.sh + melos run format )