mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-12-04 15:46:07 +00:00
ci: treat a restored 3.44 pubspec.lock as not patched
The "already applied" check looked at the Dart sources and pubspec.yaml only, so rerunning the script after restoring just flutter/pubspec.lock exited 0 with the bumped manifest and the old lock, and the following `flutter pub get --enforce-lockfile` failed. The early return now also requires the lock diff to reverse cleanly; otherwise the checkout is reported as partially patched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq
This commit is contained in:
1 parent
5434053d25
commit
9e9b74a36d
1 file changed
+6
-1
@@ -95,6 +95,11 @@ validate_patch_inputs() {
|
||||
fi
|
||||
}
|
||||
|
||||
# The lock diff reverses only once applied, so a restored pubspec.lock is not taken as patched.
|
||||
has_lock_patch() {
|
||||
sed 's/\r$//' .github/patches/flutter_3.44_pubspec.lock.diff | git apply --reverse --check 2>/dev/null
|
||||
}
|
||||
|
||||
is_complete_patch_state() {
|
||||
has_exact_count "$THEME_MATCHES" 'dialogTheme: DialogThemeData(' flutter/lib/common.dart &&
|
||||
has_exact_count "$THEME_MATCHES" 'tabBarTheme: const TabBarThemeData(' flutter/lib/common.dart &&
|
||||
@@ -136,7 +141,7 @@ if ! validate_patch_inputs; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if is_complete_patch_state; then
|
||||
if is_complete_patch_state && has_lock_patch; then
|
||||
echo "Flutter 3.44 source patches already applied."
|
||||
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml \
|
||||
flutter/lib/common/widgets/dialog.dart
|
||||
|
||||
Reference in new issue
Block a user