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
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -20,4 +20,5 @@ support/node-o3-xml/
|
|||
support/requirejs/
|
||||
|
||||
/node_modules
|
||||
support/node-o3-xml-v4/
|
||||
support/node-o3-xml-v4/
|
||||
.git-ref
|
||||
1
Makefile
1
Makefile
|
|
@ -1,4 +1,5 @@
|
|||
build:
|
||||
git rev-parse HEAD > .git-ref
|
||||
mkdir -p build/src
|
||||
mkdir -p build/demo
|
||||
mkdir -p build/textarea/src
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
);
|
||||
}]
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,13 @@
|
|||
<title>Ace Kitchen Sink</title>
|
||||
<meta name="author" content="Fabian Jakobs">
|
||||
<link rel="stylesheet" href="demo/styles.css" type="text/css" media="screen" charset="utf-8">
|
||||
<!--
|
||||
|
||||
Ace
|
||||
version %version%
|
||||
commit %commit%
|
||||
|
||||
-->
|
||||
</head>
|
||||
<body>
|
||||
<img id="logo" src="demo/logo.png">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue