From 19597e232db16f861aa157a172ebf897ec994c6f Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 2 Nov 2014 16:04:11 +0100 Subject: [PATCH] get commit hash from post-commit hook, see http://stackoverflow.com/a/14924922/2517068 --- routes/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index b483cfe..79f08f6 100644 --- a/routes/index.js +++ b/routes/index.js @@ -3,7 +3,12 @@ var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { - res.render('index', { title: 'Crafatar', domain: "https://" + req.headers.host, commit: process.env.COMMIT_HASH || "unknown" }); + res.render('index', { + title: 'Crafatar', + domain: "https://" + req.headers.host, + // see http://stackoverflow.com/a/14924922/2517068 + commit: process.env.HEAD_HASH || "unknown" + }); });