Update version to 0.1.0 and modify scripts to include VITE_APP_VERSION. Add APP_VERSION export for use in components.
This commit is contained in:
@@ -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
2
src/lib/version.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const APP_VERSION = import.meta.env.VITE_APP_VERSION || 'dev';
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user