add revision number to the kitchen sink
This commit is contained in:
parent
c018bb60e3
commit
7b143ae70e
4 changed files with 24 additions and 2 deletions
|
|
@ -37,6 +37,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var fs = require("fs");
|
||||
|
||||
var args = process.argv;
|
||||
var target = null;
|
||||
var targetDir = null;
|
||||
|
|
@ -48,6 +50,14 @@ if (args.length == 3) {
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
var version = JSON.parse(fs.readFileSync(__dirname + "/package.json")).version;
|
||||
var ref = fs.readFileSync(__dirname + "/.git-ref").toString();
|
||||
} catch(e) {
|
||||
ref = "";
|
||||
version = "";
|
||||
}
|
||||
|
||||
if (!target) {
|
||||
console.log("--- Ace Dryice Build Tool ---");
|
||||
console.log("");
|
||||
|
|
@ -317,7 +327,10 @@ function demo() {
|
|||
.replace("DEVEL-->", "")
|
||||
.replace("<!--DEVEL", "")
|
||||
.replace("PACKAGE-->", "")
|
||||
.replace("<!--PACKAGE", ""));
|
||||
.replace("<!--PACKAGE", "")
|
||||
.replace("%version%", version)
|
||||
.replace("%commit%", ref)
|
||||
);
|
||||
}]
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue