diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-11-01 14:47:13 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-11-01 14:47:13 +0100 |
| commit | 59cc8636b72e944d22b065874646ad14d44010a9 (patch) | |
| tree | 43fead755b2656c398baf6541d9083cbceedec85 /doc/tutorial | |
| parent | aa01876c95a3f50ef6129f1501d97c7a6bb0e856 (diff) | |
Fix file timestamp extraction in tutorial builder
Diffstat (limited to 'doc/tutorial')
| -rw-r--r-- | doc/tutorial/build.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/tutorial/build.js b/doc/tutorial/build.js index 308954b0be9..edefdfe3201 100644 --- a/doc/tutorial/build.js +++ b/doc/tutorial/build.js @@ -24,13 +24,13 @@ function fileDates(file, c) { function takeTime(str) { return Number(str.match(/^(\S+)\s/)[1]) * 1000; } - require("child_process").exec("git rev-list --timestamp HEAD -- " + file, function(err, stdout) { + require("child_process").exec("git rev-list --timestamp HEAD -- " + file + ".md", function(err, stdout) { if (err != null) { console.log("Failed to run git rev-list"); return; } var history = stdout.split("\n"); if (history.length && history[history.length-1] == "") history.pop(); - var created = history.length ? takeTime(history[0]) : Date.now(); + var created = history.length ? takeTime(history[history.length-1]) : Date.now(); var modified = created; - if (history.length > 1) modified = takeTime(history[history.length-1]); + if (history.length > 1) modified = takeTime(history[0]); c(created, modified); }); } |
