Skip to content

Commit

Permalink
Prevent deploying with unstaged changes - 1.0.30 🚀
Browse files Browse the repository at this point in the history
1. Drift found database changes we haven't migrated yet
2. Local changes would be included with the apk build
without showing the code that created it (f-droid reproducibility).
  • Loading branch information
brandonp2412 committed Jun 3, 2024
1 parent acb067a commit 9421cf8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -ex
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
if [[ -n "$(git diff --stat)" ]]; then
echo "There are unstaged changes in the repository:"
git --no-pager diff
exit 1
Expand Down Expand Up @@ -35,7 +35,7 @@ changelog_number=$((new_build_number * 10 + 3))
echo "$last_commits" > "fastlane/metadata/android/en-US/changelogs/$changelog_number.txt"
git add fastlane/metadata

if [[ -n "$(git ls-files --others --exclude-standard)" ]]; then
if [[ -n "$(git diff --stat)" ]]; then
echo "There are unstaged changes in the repository:"
git --no-pager diff
exit 1
Expand Down
5 changes: 5 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/313.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Prevent deploying with unstaged changes
- Prevent pushing with forgotten migrations
- Test database migrations
- Remove db global use from database.dart
- Write shell script for generating drift schemas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fit_book
description: Track your calories - Completely offline!
publish_to: none
version: 1.0.29+30
version: 1.0.30+31
environment:
sdk: '>=3.3.3 <4.0.0'
dependencies:
Expand Down

0 comments on commit 9421cf8

Please sign in to comment.