Bug Tracker

Ticket #2101: build-version-pack.patch

File build-version-pack.patch, 902 bytes (added by emartin24, 12 years ago)

version.js fix for global @VERSION replacement and pack.js fix for outFile filename

  • build/pack.js

     
    55
    66// arguments
    77var inFile = arguments[0];
    8 var outFile = arguments[1] || inFile.replace(/\.js$/, "pack.js");
     8var outFile = arguments[1] || inFile.replace(/\.js$/, ".pack.js");
    99
     10print(inFile);
     11
    1012// options
    1113var base62 = true;
    1214var shrink = true;
  • build/version.js

     
    11load("build/js/writeFile.js");
    22
    33var file = arguments[0];
    4 writeFile(file, readFile(file).replace("@VERSION", readFile("version.txt").replace( /^\s+|\s+$/g, "" )));
     4writeFile(file, readFile(file).replace(RegExp("@VERSION", "g"), readFile("version.txt").replace( /^\s+|\s+$/g, "" )));