com gtk/php-gtk: - Kill the reliance on markers - Versioning works properly now, whatever you do to it :): win32/confutils.js
[email protected] (David Soria Parra)
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 710c05c5592794857442f40858fbea8ba9f43969 Author: Steph Fox <[email protected]> Mon, 17 Jul 2006 17:00:09 +0000 Parents: f7ca891418d2edcd6d9ab8585fd5ba878e8b4a32 Branches: master Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=710c05c5592794857442f40858fbea8ba9f43969 Log: - Kill the reliance on markers - Versioning works properly now, whatever you do to it :) Changed paths: M win32/confutils.js Diff: 710c05c5592794857442f40858fbea8ba9f43969 diff --git a/win32/confutils.js b/win32/confutils.js index 6443c23..9975d5a 100644 --- a/win32/confutils.js +++ b/win32/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.18 2006-07-17 15:06:14 sfox Exp $ +// $Id: confutils.js,v 1.19 2006-07-17 17:00:09 sfox Exp $ /* set vars */ var STDOUT = WScript.StdOut; @@ -98,7 +98,7 @@ function get_version_numbers() { /* pick up the version from main/php_gtk.h */ var vin = file_get_contents("main\\php_gtk.h"); - var version, version_strings, major, minor, details, release, subversion_strings, extra = ""; + var version, version_strings, major, minor, details, release = "", extra = ""; if (vin.match(new RegExp("PHP_GTK_VERSION \"([^\"]+)\""))) { version = RegExp.$1; @@ -108,12 +108,13 @@ function get_version_numbers() { minor = version_strings[1]; details = version_strings[2]; - if (details.indexOf("-") == -1) { - release = details; - } else { - subversion_strings = details.split("-"); - release = subversion_strings[0]; - extra = "-" + subversion_strings[1]; + for (i = 0; i < details.length; i++) { + if(!isNaN(details.charAt(i))) { + release = release + details.charAt(i); + } else { + extra = details.substring(i); + break; + } } }