mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Windows] Improve version migration message (#127048)
This also migrates the platform channel example to stamp version information on Windows.
This commit is contained in:
parent
a3a0ef0393
commit
718f444bc3
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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)', () {
|
||||
@ -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.'));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user