Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Improve version migration message #127048

Merged
merged 1 commit into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/platform_channel/windows/runner/Runner.rc
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ END
// Version
//

#ifdef FLUTTER_BUILD_NUMBER
#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
#else
#define VERSION_AS_NUMBER 1,0,0
#define VERSION_AS_NUMBER 1,0,0,0
#endif

#ifdef FLUTTER_BUILD_NAME
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
#if defined(FLUTTER_VERSION)
#define VERSION_AS_STRING FLUTTER_VERSION
#else
#define VERSION_AS_STRING "1.0.0"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ This indicates non-trivial changes have been made to the Windows runner in the
);
if (originalResourceFileContents != newResourceFileContents) {
logger.printStatus(
'windows/runner/Runner.rc does not define use Flutter version information, updating.',
'windows/runner/Runner.rc does not use Flutter version information, updating.',
);
_resourceFile.writeAsStringSync(newResourceFileContents);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void main () {
);

expect(testLogger.statusText, contains('windows/runner/CMakeLists.txt does not define version information, updating.'));
expect(testLogger.statusText, contains('windows/runner/Runner.rc does not define use Flutter version information, updating.'));
expect(testLogger.statusText, contains('windows/runner/Runner.rc does not use Flutter version information, updating.'));
});

testWithoutContext('migrates project to set version information (CRLF)', () {
Expand Down Expand Up @@ -308,7 +308,7 @@ void main () {
);

expect(testLogger.statusText, contains('windows/runner/CMakeLists.txt does not define version information, updating.'));
expect(testLogger.statusText, contains('windows/runner/Runner.rc does not define use Flutter version information, updating.'));
expect(testLogger.statusText, contains('windows/runner/Runner.rc does not use Flutter version information, updating.'));
});
});
}
Expand Down