forked from Mirrors/keyoxide-web
fix: use only hash in semver build metadata
This commit is contained in:
parent
912f3619eb
commit
ed4c265dad
1 changed files with 3 additions and 8 deletions
|
@ -82,19 +82,14 @@ export function encodeZBase32 (data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMetaFromReq (req) {
|
export function getMetaFromReq (req) {
|
||||||
let versionDetails = req.app.get('git_branch')
|
let versionDetails = (req.app.get('git_hash'))
|
||||||
? `+${req.app.get('git_branch')}`
|
? `+${req.app.get('git_hash').substring(0, 10)}`
|
||||||
: ''
|
|
||||||
versionDetails += (req.app.get('git_branch') && 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 semver = `${req.app.get('keyoxide_name')}/${req.app.get('keyoxide_version')}${versionDetails}`
|
||||||
|
|
||||||
const sourceUrl = req.app.get('git_hash')
|
const sourceUrl = req.app.get('git_hash')
|
||||||
? `https://codeberg.org/keyoxide/keyoxide-web/src/commit/${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 {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue