aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-23 11:06:10 +0100
committerChocobozzz <me@florianbigard.com>2018-11-23 11:07:00 +0100
commit1b5e2d72900c8ceaf76940b72839d3c424ac96e8 (patch)
tree155fb65bd2d35259294dcfdb9d0c3e1de0400b92 /server/helpers/utils.ts
parentf95cb03a29716a455ad89877dfd5192d825e3931 (diff)
downloadPeerTube-1b5e2d72900c8ceaf76940b72839d3c424ac96e8.tar.gz
PeerTube-1b5e2d72900c8ceaf76940b72839d3c424ac96e8.tar.zst
PeerTube-1b5e2d72900c8ceaf76940b72839d3c424ac96e8.zip
Optimize config endpoint
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r--server/helpers/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts
index 049c3f8bc..5c9d6fe2f 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -57,7 +57,7 @@ function getSecureTorrentName (originalName: string) {
57 return sha256(originalName) + '.torrent' 57 return sha256(originalName) + '.torrent'
58} 58}
59 59
60async function getVersion () { 60async function getServerCommit () {
61 try { 61 try {
62 const tag = await execPromise2( 62 const tag = await execPromise2(
63 '[ ! -d .git ] || git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || true', 63 '[ ! -d .git ] || git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || true',
@@ -77,7 +77,7 @@ async function getVersion () {
77 logger.debug('Cannot get version from git HEAD.', { err }) 77 logger.debug('Cannot get version from git HEAD.', { err })
78 } 78 }
79 79
80 return require('../../../package.json').version 80 return ''
81} 81}
82 82
83/** 83/**
@@ -102,7 +102,7 @@ export {
102 getFormattedObjects, 102 getFormattedObjects,
103 getSecureTorrentName, 103 getSecureTorrentName,
104 getServerActor, 104 getServerActor,
105 getVersion, 105 getServerCommit,
106 generateVideoTmpPath, 106 generateVideoTmpPath,
107 getUUIDFromFilename 107 getUUIDFromFilename
108} 108}