forked from arxanas/drafts.ninja
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.server.js.default
More file actions
31 lines (25 loc) · 851 Bytes
/
config.server.js.default
File metadata and controls
31 lines (25 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';
const execSync = require('child_process').execSync
let versionInfo = execSync('git describe --always --long')
.toString()
.trim()
let versionInfoParts = versionInfo.split('-')
const VERSION =
versionInfoParts.length === 3
// Show the number of commits past the most recent tag, and the commit hash
// identifier. For example, `v2.0.0+3 (123abc)` indicates three commits past
// version 2.0.0, at commit `123abc`. (In the `git-describe` output, there is
// always a `g` before the commit hash, which stands for 'git', so we remove
// that.)
? `${versionInfoParts[0]}+${versionInfoParts[1]} (${versionInfoParts[2].slice(1)})`
// If there is no tag, just display the commit hash.
: versionInfo
module.exports = {
PORT: 1337,
VERSION,
STRINGS: {
BRANDING: {
DEFAULT_USERNAME: 'ninja',
}
}
}