make sure version check includes hotfixes (#33459)

This commit is contained in:
Jonah Williams
2019-06-06 15:28:20 -07:00
committed by GitHub
parent 7d27550f6f
commit 3f4ce34877

View File

@@ -673,7 +673,7 @@ Future<void> _verifyVersion(String filename) async {
print('$redLine');
exit(1);
}
final RegExp pattern = RegExp(r'^[0-9]+\.[0-9]+\.[0-9]+(-pre\.[0-9]+)?$');
final RegExp pattern = RegExp(r'^\d+\.\d+\.\d+(?:|-pre\.\d+|\+hotfix\.\d+)$');
if (!version.contains(pattern)) {
print('$redLine');
print('The version logic generated an invalid version string.');