Update version to 0.1.0 and modify scripts to include VITE_APP_VERSION. Add APP_VERSION export for use in components.
Some checks failed
CI / check (push) Failing after 1m22s
CI / build (push) Has been skipped

This commit is contained in:
2025-12-24 17:03:48 -06:00
parent b1d4d24b18
commit f7becdb26e
3 changed files with 8 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "surveilled",
"private": true,
"version": "0.0.1",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"dev": "VITE_APP_VERSION=$(node -p \"require('./package.json').version\") vite dev",
"build": "VITE_APP_VERSION=$(node -p \"require('./package.json').version\") vite build",
"preview": "VITE_APP_VERSION=$(node -p \"require('./package.json').version\") vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",

2
src/lib/version.ts Normal file
View File

@@ -0,0 +1,2 @@
export const APP_VERSION = import.meta.env.VITE_APP_VERSION || 'dev';

View File

@@ -37,6 +37,7 @@
STATUS_MESSAGES,
ERROR_MESSAGES,
} from '$lib/constants';
import { APP_VERSION } from '$lib/version';
import favicon from '$lib/assets/favicon.svg';
let mapContainer: HTMLDivElement;
@@ -849,6 +850,7 @@
<a href="https://git.quad4.io/Quad4-Software/Surveilled" target="_blank" rel="noopener noreferrer" class="inline-flex items-center text-text-secondary hover:text-accent-red-light transition-colors" title="View on Gitea">
<GitBranch size={14} />
</a>
<span class="text-xs opacity-60 ml-1">v{APP_VERSION}</span>
</p>
<p class="text-xs opacity-75">
Data is fetched from OSM Overpass and may not be accurate or up to date as this data is community-sourced.