mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore: migrate mobile makefile to mise (#28390)
This commit is contained in:
+9
-38
@@ -1,55 +1,26 @@
|
||||
.PHONY: build watch create_app_icon create_splash build_release_android pigeon test analyze format
|
||||
.PHONY: build watch create_app_icon create_splash build_release_android pigeon test analyze format migration translation
|
||||
|
||||
build:
|
||||
dart run build_runner build --delete-conflicting-outputs
|
||||
# Remove once auto_route updated to 10.1.0
|
||||
dart format lib/routing/router.gr.dart
|
||||
@printf "This command has been removed. Please use:\n\n mise codegen # or mise //:mobile:codegen:dart from another directory\n\n" >&2 && exit 1
|
||||
|
||||
pigeon:
|
||||
dart run pigeon --input pigeon/native_sync_api.dart
|
||||
dart run pigeon --input pigeon/local_image_api.dart
|
||||
dart run pigeon --input pigeon/remote_image_api.dart
|
||||
dart run pigeon --input pigeon/background_worker_api.dart
|
||||
dart run pigeon --input pigeon/background_worker_lock_api.dart
|
||||
dart run pigeon --input pigeon/connectivity_api.dart
|
||||
dart run pigeon --input pigeon/network_api.dart
|
||||
dart format lib/platform/native_sync_api.g.dart
|
||||
dart format lib/platform/local_image_api.g.dart
|
||||
dart format lib/platform/remote_image_api.g.dart
|
||||
dart format lib/platform/background_worker_api.g.dart
|
||||
dart format lib/platform/background_worker_lock_api.g.dart
|
||||
dart format lib/platform/connectivity_api.g.dart
|
||||
dart format lib/platform/network_api.g.dart
|
||||
@printf "This command has been removed. Please use:\n\n mise pigeon # or mise //:mobile:codegen:pigeon from another directory\n\n" >&2 && exit 1
|
||||
|
||||
watch:
|
||||
dart run build_runner watch --delete-conflicting-outputs
|
||||
|
||||
create_app_icon:
|
||||
flutter pub run flutter_launcher_icons:main
|
||||
|
||||
create_splash:
|
||||
flutter pub run flutter_native_splash:create
|
||||
|
||||
build_release_android:
|
||||
flutter build appbundle
|
||||
@printf "This command has been removed. Please use:\n\n mise run build:android # or mise //:mobile:build:android from another directory\n\n" >&2 && exit 1
|
||||
|
||||
migration:
|
||||
dart run drift_dev make-migrations
|
||||
@printf "This command has been removed. Please use:\n\n mise migration # or mise //:mobile:drift:migration from another directory\n\n" >&2 && exit 1
|
||||
|
||||
translation:
|
||||
pnpm --prefix ../i18n run format:fix
|
||||
dart run easy_localization:generate -S ../i18n
|
||||
dart run bin/generate_keys.dart
|
||||
dart format lib/generated/codegen_loader.g.dart
|
||||
dart format lib/generated/translations.g.dart
|
||||
@printf "This command has been removed. Please use:\n\n mise translation # or mise //:mobile:codegen:translation from another directory\n\n" >&2 && exit 1
|
||||
|
||||
analyze:
|
||||
dart analyze --fatal-infos
|
||||
dcm analyze lib --fatal-style --fatal-warnings
|
||||
@printf "This command has been removed. Please use:\n\n mise analyze # or mise //:mobile:lint from another directory\n\n" >&2 && exit 1
|
||||
|
||||
format:
|
||||
# Ignore generated files manually until https://github.com/dart-lang/dart_style/issues/864 is resolved
|
||||
dart format --set-exit-if-changed $$(find lib -name '*.dart' -not \( -name 'generated_plugin_registrant.dart' -o -name '*.g.dart' -o -name '*.drift.dart' \))
|
||||
@printf "This command has been removed. Please use:\n\n mise format # or mise //:mobile:format from another directory\n\n" >&2 && exit 1
|
||||
|
||||
test:
|
||||
flutter test
|
||||
@printf "This command has been removed. Please use:\n\n mise test # or mise //:mobile:test from another directory\n\n" >&2 && exit 1
|
||||
|
||||
+27
-80
@@ -29,12 +29,15 @@ run = "dart run build_runner watch --delete-conflicting-outputs"
|
||||
[tasks."codegen:pigeon"]
|
||||
alias = "pigeon"
|
||||
description = "Generate pigeon platform code"
|
||||
depends = [
|
||||
"pigeon:native-sync",
|
||||
"pigeon:thumbnail",
|
||||
"pigeon:background-worker",
|
||||
"pigeon:background-worker-lock",
|
||||
"pigeon:connectivity",
|
||||
run = [
|
||||
"dart run pigeon --input pigeon/native_sync_api.dart",
|
||||
"dart run pigeon --input pigeon/local_image_api.dart",
|
||||
"dart run pigeon --input pigeon/remote_image_api.dart",
|
||||
"dart run pigeon --input pigeon/background_worker_api.dart",
|
||||
"dart run pigeon --input pigeon/background_worker_lock_api.dart",
|
||||
"dart run pigeon --input pigeon/connectivity_api.dart",
|
||||
"dart run pigeon --input pigeon/network_api.dart",
|
||||
"dart format lib/platform/native_sync_api.g.dart lib/platform/local_image_api.g.dart lib/platform/remote_image_api.g.dart lib/platform/background_worker_api.g.dart lib/platform/background_worker_lock_api.g.dart lib/platform/connectivity_api.g.dart lib/platform/network_api.g.dart",
|
||||
]
|
||||
|
||||
[tasks."codegen:translation"]
|
||||
@@ -60,13 +63,15 @@ run = "flutter pub run flutter_native_splash:create"
|
||||
description = "Run mobile tests"
|
||||
run = "flutter test"
|
||||
|
||||
[tasks.lint]
|
||||
[tasks.analyze]
|
||||
alias = "lint"
|
||||
description = "Analyze Dart code"
|
||||
depends = ["analyze:dart", "analyze:dcm"]
|
||||
|
||||
[tasks."lint-fix"]
|
||||
[tasks."analyze-fix"]
|
||||
alias = "lint-fix"
|
||||
description = "Auto-fix Dart code"
|
||||
depends = ["analyze:fix:dart", "analyze:fix:dcm"]
|
||||
depends = ["analyze-fix:dart", "analyze-fix:dcm"]
|
||||
|
||||
[tasks.format]
|
||||
description = "Format Dart code"
|
||||
@@ -83,75 +88,6 @@ run = "dart run drift_dev make-migrations"
|
||||
|
||||
|
||||
# Internal tasks
|
||||
[tasks."pigeon:native-sync"]
|
||||
description = "Generate native sync API pigeon code"
|
||||
hide = true
|
||||
sources = ["pigeon/native_sync_api.dart"]
|
||||
outputs = [
|
||||
"lib/platform/native_sync_api.g.dart",
|
||||
"ios/Runner/Sync/Messages.g.swift",
|
||||
"android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt",
|
||||
]
|
||||
run = [
|
||||
"dart run pigeon --input pigeon/native_sync_api.dart",
|
||||
"dart format lib/platform/native_sync_api.g.dart",
|
||||
]
|
||||
|
||||
[tasks."pigeon:thumbnail"]
|
||||
description = "Generate thumbnail API pigeon code"
|
||||
hide = true
|
||||
sources = ["pigeon/thumbnail_api.dart"]
|
||||
outputs = [
|
||||
"lib/platform/thumbnail_api.g.dart",
|
||||
"ios/Runner/Images/Thumbnails.g.swift",
|
||||
"android/app/src/main/kotlin/app/alextran/immich/images/Thumbnails.g.kt",
|
||||
]
|
||||
run = [
|
||||
"dart run pigeon --input pigeon/thumbnail_api.dart",
|
||||
"dart format lib/platform/thumbnail_api.g.dart",
|
||||
]
|
||||
|
||||
[tasks."pigeon:background-worker"]
|
||||
description = "Generate background worker API pigeon code"
|
||||
hide = true
|
||||
sources = ["pigeon/background_worker_api.dart"]
|
||||
outputs = [
|
||||
"lib/platform/background_worker_api.g.dart",
|
||||
"ios/Runner/Background/BackgroundWorker.g.swift",
|
||||
"android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt",
|
||||
]
|
||||
run = [
|
||||
"dart run pigeon --input pigeon/background_worker_api.dart",
|
||||
"dart format lib/platform/background_worker_api.g.dart",
|
||||
]
|
||||
|
||||
[tasks."pigeon:background-worker-lock"]
|
||||
description = "Generate background worker lock API pigeon code"
|
||||
hide = true
|
||||
sources = ["pigeon/background_worker_lock_api.dart"]
|
||||
outputs = [
|
||||
"lib/platform/background_worker_lock_api.g.dart",
|
||||
"android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt",
|
||||
]
|
||||
run = [
|
||||
"dart run pigeon --input pigeon/background_worker_lock_api.dart",
|
||||
"dart format lib/platform/background_worker_lock_api.g.dart",
|
||||
]
|
||||
|
||||
[tasks."pigeon:connectivity"]
|
||||
description = "Generate connectivity API pigeon code"
|
||||
hide = true
|
||||
sources = ["pigeon/connectivity_api.dart"]
|
||||
outputs = [
|
||||
"lib/platform/connectivity_api.g.dart",
|
||||
"ios/Runner/Connectivity/Connectivity.g.swift",
|
||||
"android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt",
|
||||
]
|
||||
run = [
|
||||
"dart run pigeon --input pigeon/connectivity_api.dart",
|
||||
"dart format lib/platform/connectivity_api.g.dart",
|
||||
]
|
||||
|
||||
[tasks."i18n:loader"]
|
||||
description = "Generate i18n loader"
|
||||
hide = true
|
||||
@@ -182,12 +118,23 @@ description = "Run Dart Code Metrics"
|
||||
hide = true
|
||||
run = "dcm analyze lib --fatal-style --fatal-warnings"
|
||||
|
||||
[tasks."analyze:fix:dart"]
|
||||
[tasks."analyze-fix:dart"]
|
||||
description = "Auto-fix Dart analysis"
|
||||
hide = true
|
||||
run = "dart fix --apply"
|
||||
|
||||
[tasks."analyze:fix:dcm"]
|
||||
[tasks."analyze-fix:dcm"]
|
||||
description = "Auto-fix Dart Code Metrics"
|
||||
hide = true
|
||||
run = "dcm fix lib"
|
||||
|
||||
|
||||
[tasks.checklist]
|
||||
run = [
|
||||
{task = "codegen:pigeon" },
|
||||
{task = "codegen:dart" },
|
||||
{task = "codegen:translation" },
|
||||
{task = "analyze" },
|
||||
{task = "format" },
|
||||
{task = "test" },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user