diff options
Diffstat (limited to 'server/tools/cli.ts')
-rw-r--r-- | server/tools/cli.ts | 13 |
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 @@ | |||
1 | const config = require('application-config')('PeerTube/CLI') | 1 | const config = require('application-config')('PeerTube/CLI') |
2 | const netrc = require('netrc-parser').default | 2 | const netrc = require('netrc-parser').default |
3 | import { getVersion } from '../helpers/utils' | ||
3 | 4 | ||
4 | const version = () => { | 5 | const 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 | ||
16 | let settings = { | 7 | let settings = { |
17 | remotes: [], | 8 | remotes: [], |