While playing with some additional test cases Dave Kilzer suggested, I realized that the auto-version.pl script does not match the behavior of the original auto-version.sh script. This patch fixes the problem for the following test cases: 10530.1.1.1 10530.30.20.10 10530.300.200.100 10530.3000.2000.1000 7530.30.20.10 7530.300.200.100 7530.3000.2000.1000
<rdar://problem/17763546>
Created attachment 235294 [details] Patch
Comment on attachment 235294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235294&action=review r=me > WebKitLibraries/win/tools/scripts/auto-version.pl:126 > + $PROPOSED_VERSION =~ s/^\s*(.*)\s*$/$1/; # Get rid of any leading/trailing whitespace > + Please add one test with trailing and leading whitespace. (I didn't see any added to this patch.) > WebKitLibraries/win/tools/scripts/auto-version.pl:127 > # Split out the three components of the dotted version number. We pad Nit: "three components" isn't accurate; maybe just remove the word "three". > WebKitLibraries/win/tools/scripts/auto-version.pl:153 > + $PROPOSED_VERSION = substr $PROPOSED_VERSION, $charactersToRemove; Nit: Kind of weird to omit parens here for substr() when they're used everywhere else.
Comment on attachment 235294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235294&action=review >> WebKitLibraries/win/tools/scripts/auto-version.pl:126 >> + > > Please add one test with trailing and leading whitespace. (I didn't see any added to this patch.) Will do. >> WebKitLibraries/win/tools/scripts/auto-version.pl:127 >> # Split out the three components of the dotted version number. We pad > > Nit: "three components" isn't accurate; maybe just remove the word "three". Done. >> WebKitLibraries/win/tools/scripts/auto-version.pl:153 >> + $PROPOSED_VERSION = substr $PROPOSED_VERSION, $charactersToRemove; > > Nit: Kind of weird to omit parens here for substr() when they're used everywhere else. Agreed! Fixed.
Committed r171351: <http://trac.webkit.org/changeset/171351>