1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

show last commit hash alongside server version in footer

This commit is contained in:
Rigel Kent 2018-09-29 19:53:49 +02:00 committed by Chocobozzz
parent 26b4151762
commit abb2c7927c
6 changed files with 27 additions and 12 deletions

View file

@ -1,17 +1,8 @@
const config = require('application-config')('PeerTube/CLI')
const netrc = require('netrc-parser').default
import { getVersion } from '../helpers/utils'
const version = () => {
const tag = require('child_process')
.execSync('[[ ! -d .git ]] || git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || true', { stdio: [0,1,2] })
if (tag) return tag
const version = require('child_process')
.execSync('[[ ! -d .git ]] || git rev-parse --short HEAD').toString().trim()
if (version) return version
return require('../../../package.json').version
}
const version = getVersion
let settings = {
remotes: [],