From ed4c265dadac6ad1f94e7c27fa48fdd0f7479490 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Tue, 30 Jan 2024 01:21:13 +0100 Subject: [PATCH] fix: use only hash in semver build metadata --- src/server/utils.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/server/utils.js b/src/server/utils.js index 852d989..fb1cbc1 100644 --- a/src/server/utils.js +++ b/src/server/utils.js @@ -82,20 +82,15 @@ export function encodeZBase32 (data) { } export function getMetaFromReq (req) { - let versionDetails = req.app.get('git_branch') - ? `+${req.app.get('git_branch')}` - : '' - versionDetails += (req.app.get('git_branch') && req.app.get('git_hash')) - ? `.${req.app.get('git_hash').substring(0, 10)}` + let versionDetails = (req.app.get('git_hash')) + ? `+${req.app.get('git_hash').substring(0, 10)}` : '' const semver = `${req.app.get('keyoxide_name')}/${req.app.get('keyoxide_version')}${versionDetails}` const sourceUrl = req.app.get('git_hash') ? `https://codeberg.org/keyoxide/keyoxide-web/src/commit/${req.app.get('git_hash')}` - : req.app.get('git_branch') - ? `https://codeberg.org/keyoxide/keyoxide-web/src/branch/${req.app.get('git_branch')}` - : 'https://codeberg.org/keyoxide/keyoxide-web' + : 'https://codeberg.org/keyoxide/keyoxide-web' return { env: req.app.get('env'),