feat(frontend): show latest tag in footer
This commit is contained in:
parent
6c863bea96
commit
52606e850d
|
@ -8,7 +8,11 @@
|
||||||
|
|
||||||
export let data: LayoutData;
|
export let data: LayoutData;
|
||||||
|
|
||||||
const versionMismatch = data.git_commit !== version && data.git_commit !== "[unknown]";
|
const versionParts = version.split("-");
|
||||||
|
let commit = "[unknown]";
|
||||||
|
if (versionParts.length >= 3) commit = versionParts[2];
|
||||||
|
|
||||||
|
const versionMismatch = data.git_commit !== commit && data.git_commit !== "[unknown]";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
@ -23,7 +27,7 @@
|
||||||
<footer>
|
<footer>
|
||||||
<hr />
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
pronouns.cc <a href="https://codeberg.org/u1f320/pronouns.cc/commit/{version}">{version}</a>
|
pronouns.cc <a href="https://codeberg.org/u1f320/pronouns.cc/commit/{commit}">{version}</a>
|
||||||
{#if versionMismatch}
|
{#if versionMismatch}
|
||||||
(backend: <a href="https://codeberg.org/u1f320/pronouns.cc/commit/{data.git_commit}">
|
(backend: <a href="https://codeberg.org/u1f320/pronouns.cc/commit/{data.git_commit}">
|
||||||
{data.git_commit}
|
{data.git_commit}
|
||||||
|
|
|
@ -11,7 +11,7 @@ const config = {
|
||||||
kit: {
|
kit: {
|
||||||
adapter: adapter(),
|
adapter: adapter(),
|
||||||
version: {
|
version: {
|
||||||
name: child_process.execSync("git rev-parse --short HEAD").toString().trim(),
|
name: child_process.execSync("git describe --tags --long").toString().trim(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue