Ticket #3546: 3546.patch
File 3546.patch, 2.5 KB (added by , 15 years ago) |
---|
-
_source/includes/ckreleaser.js
12 12 verbose : 0, 13 13 os : System.getProperty( "os.name" ).substring( 0, 3 ).toLowerCase(), 14 14 path : "", 15 revisionNumber : 0, 15 16 16 17 timestamp : ( function() 17 18 { -
_source/includes/releaser.js
254 254 } 255 255 if ( text.indexOf( "%REV%" ) != -1 ) 256 256 { 257 var o =257 if ( !CKRELEASER.revisionNumber ) 258 258 { 259 output : "" 260 }; 259 try 260 { 261 var o = 262 { 263 output : "" 264 }; 261 265 262 runCommand( "svn", "info", CKRELEASER.sourceDir, o );266 runCommand( "svn", "info", CKRELEASER.sourceDir, o ); 263 267 264 if ( o.output.indexOf( "Revision:" ) != -1 ) 265 { 266 var rev = regexLib.packagerRev.matcher( o.output ).replaceAll( '$1' ); 267 text = text.replace( /%REV%/g, rev ); 268 if ( o.output.indexOf( "Revision:" ) != -1 ) 269 { 270 CKRELEASER.revisionNumber = regexLib.packagerRev.matcher( o.output ).replaceAll( '$1' ); 271 } 272 else 273 { 274 if ( o.output.indexOf( "not a working" ) != -1 ) 275 print( "\nWARNING: Unable to fetch the revision number, source directory is not under version control: " 276 + CKRELEASER.sourceDir ); 277 else 278 print( "\nWARNING: Unable to fetch the revision number, make sure that Subversion's bin directory is in your system path." ); 279 } 280 } 281 catch( e ) 282 { 283 print( "\nWARNING: Unable to run \"svn\" command to get the revision number, make sure that Subversion is installed and that Subversion's bin directory is in your system path." ); 284 } 285 286 if ( !CKRELEASER.revisionNumber ) 287 CKRELEASER.revisionNumber = "UNKNOWN"; 268 288 } 269 else270 {271 if ( o.output.indexOf( "not a working" ) != -1 )272 print( "WARNING: Unable to fetch the revision number, source directory is not under version control: "273 + CKRELEASER.sourceDir );274 else275 print( "WARNING: Unable to fetch the revision number, make sure that Subversions bin directory is in your system path." );276 text = text.replace( /%REV%/g, "UNKNOWN" );277 }278 289 290 text = text.replace( /%REV%/g, CKRELEASER.revisionNumber ); 291 279 292 replaced = true; 280 293 } 281 294 if ( text.indexOf( "%TIMESTAMP%" ) != -1 )