Skip to content

Commit

Permalink
Prevent pushing with forgotten migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonp2412 committed Jun 3, 2024
1 parent 8c412e9 commit acb067a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
14 changes: 10 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
set -ex

./flutter/bin/flutter test
dart run drift_dev schema dump lib/database.dart drift_schemas
dart run drift_dev schema steps drift_schemas/ lib/database/schema_versions.dart

if [[ -n "$(git ls-files --others --exclude-standard)" ]]; then
echo "There are unstaged changes in the repository:"
git --no-pager diff
exit 1
fi

./screenshots.sh "phoneScreenshots"
./screenshots.sh "sevenInchScreenshots"
./screenshots.sh "tenInchScreenshots"
Expand All @@ -29,13 +38,10 @@ git add fastlane/metadata
if [[ -n "$(git ls-files --others --exclude-standard)" ]]; then
echo "There are unstaged changes in the repository:"
git --no-pager diff
git restore --staged pubspec.yaml fastlane/metadata
git restore pubspec.yaml fastlane/metadata
rm "fastlane/metadata/android/en-US/changelogs/$changelog_number.txt"
exit 1
fi

./flutter/bin/flutter build apk --split-per-abi

./flutter/bin/flutter build apk
./flutter/bin/flutter build appbundle
mkdir -p build/native_assets/linux
Expand Down
7 changes: 1 addition & 6 deletions lib/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ class AppDatabase extends _$AppDatabase {
from3To4: (m, schema) async {
await m.alterTable(TableMigration(schema.entries));
},
from4To5: (m, schema) async {
// await m.addColumn(entries, entries.kCalories);
// await m.addColumn(entries, entries.proteinG);
// await m.addColumn(entries, entries.fatG);
// await m.addColumn(entries, entries.carbG);
},
from4To5: (m, schema) async {},
from5To6: (m, schema) async {
await m.createIndex(
Index(
Expand Down

0 comments on commit acb067a

Please sign in to comment.