+2014-07-21 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Correct auto-version.pl script for two-digit version numbers
+ https://bugs.webkit.org/show_bug.cgi?id=135119
+ <rdar://problem/17743959>
+
+ Reviewed by David Kilzer.
+
+ The $MAJOR_VERSION must be the first digit of $BUILD_MAJOR_VERSION,
+ and $MINOR_VERSION must be the remaining digits.
+
+ Also correct regexp (line 90) that was allowing version numbers
+ larger than three digits to be processed.
+
+ * win/tools/scripts/auto-version.pl: Correct regular expression.
+
2014-07-18 Dana Burkart <dburkart@apple.com>
Add a new 'analyze' target to the makefile. This will make use of a new
# Cut the major component down to three characters by dropping any
# extra leading digits, then adjust the major version portion of the
# version string to match.
-$BUILD_MAJOR_VERSION =~ s/^.*(\d\d\d+)$/$1/;
+$BUILD_MAJOR_VERSION =~ s/^.*(\d\d\d)$/$1/;
# Have the minor and tiny components default to zero if not present.
if (!defined $BUILD_MINOR_VERSION) {
# major version and the remaining two characters as the minor version.
# The minor version is shifted down to the tiny version, with the tiny
# version becoming the variant version.
-$BUILD_MAJOR_VERSION =~ m/^.*(\d)(\d\d)/;
+$BUILD_MAJOR_VERSION =~ m/^[^\d]*(\d)(\d{1,})/;
my $MAJOR_VERSION = $1;
my $MINOR_VERSION = $2;
my $TINY_VERSION = $BUILD_MINOR_VERSION;