Unverified Commit 718f444b authored by Loïc Sharma's avatar Loïc Sharma Committed by GitHub

[Windows] Improve version migration message (#127048)

This also migrates the platform channel example to stamp version information on Windows.
parent a3a0ef03
...@@ -50,14 +50,14 @@ END ...@@ -50,14 +50,14 @@ END
// Version // Version
// //
#ifdef 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_BUILD_NUMBER #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
#else #else
#define VERSION_AS_NUMBER 1,0,0 #define VERSION_AS_NUMBER 1,0,0,0
#endif #endif
#ifdef FLUTTER_BUILD_NAME #if defined(FLUTTER_VERSION)
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME #define VERSION_AS_STRING FLUTTER_VERSION
#else #else
#define VERSION_AS_STRING "1.0.0" #define VERSION_AS_STRING "1.0.0"
#endif #endif
......
...@@ -115,7 +115,7 @@ This indicates non-trivial changes have been made to the Windows runner in the ...@@ -115,7 +115,7 @@ This indicates non-trivial changes have been made to the Windows runner in the
); );
if (originalResourceFileContents != newResourceFileContents) { if (originalResourceFileContents != newResourceFileContents) {
logger.printStatus( 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); _resourceFile.writeAsStringSync(newResourceFileContents);
} }
......
...@@ -246,7 +246,7 @@ void main () { ...@@ -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/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)', () { testWithoutContext('migrates project to set version information (CRLF)', () {
...@@ -308,7 +308,7 @@ void main () { ...@@ -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/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.'));
}); });
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment