aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/cli.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/cli.ts')
-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: [],