Compare commits
2
Commits
1.0.0
..
f0306a6dd8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0306a6dd8 | ||
|
|
35c439dba4 |
@@ -12,6 +12,9 @@ COPY . .
|
|||||||
|
|
||||||
RUN composer install --no-dev --optimize-autoloader
|
RUN composer install --no-dev --optimize-autoloader
|
||||||
|
|
||||||
|
ARG APP_VERSION=Dev
|
||||||
|
ENV VITE_APP_VERSION=$APP_VERSION
|
||||||
|
|
||||||
RUN npm install && npm run build && rm -f public/hot
|
RUN npm install && npm run build && rm -f public/hot
|
||||||
|
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import { SharedProps } from "@/Types/types"
|
|||||||
|
|
||||||
const page = usePage<SharedProps>().props
|
const page = usePage<SharedProps>().props
|
||||||
const year = new Date().getFullYear()
|
const year = new Date().getFullYear()
|
||||||
|
const version = __APP_VERSION__
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<footer class="glass">
|
<footer class="glass">
|
||||||
<span class="footer-copyright">
|
<span class="footer-copyright">
|
||||||
© {{ year }} FlightsGoneBy
|
© {{ year }} FlightsGoneBy
|
||||||
|
<span class="footer-version">v{{ version }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="footer-links">
|
<span class="footer-links">
|
||||||
@@ -73,4 +75,9 @@ footer {
|
|||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-version {
|
||||||
|
opacity: 0.8;
|
||||||
|
margin-left: 0.4em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Vendored
+1
@@ -2,3 +2,4 @@
|
|||||||
/// <reference types="vite-plugin-pwa/client" />
|
/// <reference types="vite-plugin-pwa/client" />
|
||||||
|
|
||||||
declare module '*.css'
|
declare module '*.css'
|
||||||
|
declare const __APP_VERSION__: string
|
||||||
|
|||||||
@@ -4,8 +4,22 @@ import vue from '@vitejs/plugin-vue';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import vuetify from "vite-plugin-vuetify";
|
import vuetify from "vite-plugin-vuetify";
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
|
import { execSync } from 'child_process'
|
||||||
|
|
||||||
|
|
||||||
|
function getAppVersion(): string {
|
||||||
|
try {
|
||||||
|
// Prefer a tag if one points at HEAD, else fall back to short hash
|
||||||
|
return execSync('git describe --tags --always --dirty').toString().trim()
|
||||||
|
} catch {
|
||||||
|
return 'Unknown'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
define: {
|
||||||
|
__APP_VERSION__: JSON.stringify(process.env.VITE_APP_VERSION ?? 'Dev'),
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
laravel({
|
laravel({
|
||||||
input: 'resources/js/app.ts',
|
input: 'resources/js/app.ts',
|
||||||
|
|||||||
Reference in New Issue
Block a user