feat: show git tag version
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
<div class="sidebar-divider" />
|
<div class="sidebar-divider" />
|
||||||
<div class="footer-row">
|
<div class="footer-row">
|
||||||
<p class="font-mono text-[10px] tracking-widest uppercase text-white/40">
|
<p class="font-mono text-[10px] tracking-widest uppercase text-white/40">
|
||||||
Supervisor v1.0
|
Supervisor {{ appVersion }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="footer-row">
|
<div class="footer-row">
|
||||||
<p class="font-mono text-[10px] tracking-widest uppercase text-white/40">
|
<p class="font-mono text-[10px] tracking-widest uppercase text-white/40">
|
||||||
Supervisor v1.0
|
Supervisor {{ appVersion }}
|
||||||
</p>
|
</p>
|
||||||
<button class="close-button" type="button" @click="isMenuOpen = false">
|
<button class="close-button" type="button" @click="isMenuOpen = false">
|
||||||
<IconifyIcon icon="mdi:close" class="text-xl" />
|
<IconifyIcon icon="mdi:close" class="text-xl" />
|
||||||
@@ -143,6 +143,9 @@ import { ref } from "vue"
|
|||||||
import { Icon as IconifyIcon } from "@iconify/vue"
|
import { Icon as IconifyIcon } from "@iconify/vue"
|
||||||
import logoSrc from '~/assets/LOGO_CARRE_BLANC.png'
|
import logoSrc from '~/assets/LOGO_CARRE_BLANC.png'
|
||||||
|
|
||||||
|
const {
|
||||||
|
public: { appVersion }
|
||||||
|
} = useRuntimeConfig()
|
||||||
const isMenuOpen = ref(false)
|
const isMenuOpen = ref(false)
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,32 @@
|
|||||||
|
import { execSync } from "node:child_process"
|
||||||
import tailwindcss from "@tailwindcss/vite"
|
import tailwindcss from "@tailwindcss/vite"
|
||||||
|
|
||||||
|
const getRepoVersion = () => {
|
||||||
|
try {
|
||||||
|
const tags = execSync(
|
||||||
|
"git for-each-ref --sort=-version:refname --format='%(refname:short)' refs/tags",
|
||||||
|
{ encoding: "utf8" }
|
||||||
|
)
|
||||||
|
.split("\n")
|
||||||
|
.map((tag) => tag.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
|
||||||
|
return tags[0] || "dev"
|
||||||
|
} catch {
|
||||||
|
return "dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: '2025-07-15',
|
compatibilityDate: "2025-07-15",
|
||||||
devtools: { enabled: true },
|
devtools: { enabled: true },
|
||||||
css: ["~/assets/css/main.css"],
|
css: ["~/assets/css/main.css"],
|
||||||
|
runtimeConfig: {
|
||||||
|
public: {
|
||||||
|
appVersion: getRepoVersion()
|
||||||
|
}
|
||||||
|
},
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss()]
|
plugins: [tailwindcss()]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user