aboutsummaryrefslogtreecommitdiff
path: root/src/services/version/version.service.js
blob: 6c5036c1b017130b0fd9f0ca75d40c1fff3f9300 (plain)
1
2
3
4
5
6
7
8
9
10

export const parseBackendVersionString = versionString => {
  const regex = /(-g)(\w+)$/i
  const replacer = '$1<a href="https://git.pleroma.social/pleroma/pleroma/commit/$2" target="_blank">$2</a>'
  return versionString.replace(regex, replacer)
}

export const parseFrontendVersionString = versionString => {
  return `<a href="https://git.pleroma.social/pleroma/pleroma-fe/commit/${versionString}" target="_blank">#${versionString}</a>`
}