aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-09-29 19:53:49 +0200
committerChocobozzz <me@florianbigard.com>2018-10-01 14:31:01 +0200
commitabb2c7927ca1640a755e0ec32c51bcc9c873b34c (patch)
tree4ded5e7559d48d450f861f5ec5c0a1a794cc2e15 /server/tools
parent26b415176212b44ff6ce168cb00aeb93b10c0cb3 (diff)
downloadPeerTube-abb2c7927ca1640a755e0ec32c51bcc9c873b34c.tar.gz
PeerTube-abb2c7927ca1640a755e0ec32c51bcc9c873b34c.tar.zst
PeerTube-abb2c7927ca1640a755e0ec32c51bcc9c873b34c.zip
show last commit hash alongside server version in footer
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/cli.ts13
1 files changed, 2 insertions, 11 deletions
diff --git a/server/tools/cli.ts b/server/tools/cli.ts
index 9a170d4da..87d1512a3 100644
--- a/server/tools/cli.ts
+++ b/server/tools/cli.ts
@@ -1,17 +1,8 @@
1const config = require('application-config')('PeerTube/CLI') 1const config = require('application-config')('PeerTube/CLI')
2const netrc = require('netrc-parser').default 2const netrc = require('netrc-parser').default
3import { getVersion } from '../helpers/utils'
3 4
4const version = () => { 5const version = getVersion
5 const tag = require('child_process')
6 .execSync('[[ ! -d .git ]] || git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || true', { stdio: [0,1,2] })
7 if (tag) return tag
8
9 const version = require('child_process')
10 .execSync('[[ ! -d .git ]] || git rev-parse --short HEAD').toString().trim()
11 if (version) return version
12
13 return require('../../../package.json').version
14}
15 6
16let settings = { 7let settings = {
17 remotes: [], 8 remotes: [],