feat: implement automated versioning and update docs
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-12-15 16:06:38 +01:00
parent cd7707a725
commit bc40969ad7
7 changed files with 67 additions and 4 deletions
+6 -1
View File
@@ -20,7 +20,12 @@ export default function AdminSettings() {
<ArrowLeft className="w-5 h-5" />
</Button>
<div>
<h1 className="text-3xl font-bold tracking-tight">{t('settings.admin.title')}</h1>
<div className="flex items-center gap-3">
<h1 className="text-3xl font-bold tracking-tight">{t('settings.admin.title')}</h1>
<span className="text-sm font-mono text-muted-foreground border px-2 py-0.5 rounded-md bg-muted/50">
v{__APP_VERSION__}
</span>
</div>
<p className="text-muted-foreground">{t('settings.admin.description')}</p>
</div>
</div>
+3
View File
@@ -0,0 +1,3 @@
/// <reference types="vite/client" />
declare const __APP_VERSION__: string;
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "rest-express",
"version": "1.0.2",
"version": "1.0.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "rest-express",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"dependencies": {
"@dnd-kit/core": "^6.3.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "rest-express",
"version": "1.0.2",
"version": "1.0.3",
"type": "module",
"license": "MIT",
"scripts": {
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
HOOK_DIR=".git/hooks"
HOOK_FILE="$HOOK_DIR/pre-commit"
echo "Setting up pre-commit hook in $HOOK_FILE..."
# Create hooks directory if it doesn't exist (unlikely in a git repo, but good practice)
mkdir -p "$HOOK_DIR"
# Create the pre-commit script
cat > "$HOOK_FILE" << 'EOF'
#!/bin/sh
# Auto-increment patch version for every commit
# --no-git-tag-version prevents creating a git tag for every commit (too noisy)
# The version bump happens BEFORE the commit object is created.
echo "🤖 Bumping patch version..."
if npm version patch --no-git-tag-version; then
# Add the updated package.json and package-lock.json to the index
# so they are included in the CURRENT commit.
git add package.json package-lock.json
echo "✅ Version bumped and added to commit."
else
echo "❌ Version bump failed. Aborting commit."
exit 1
fi
EOF
# Make executable
chmod +x "$HOOK_FILE"
echo "✅ Git pre-commit hook installed successfully!"
+19
View File
@@ -107,6 +107,10 @@
- [x] **Translation & UI Polish**:
- [x] **Settings - Social & Privacy**: ADD MISSING TRANSLATION <!-- id: 401 -->
- [x] Move MCP Settings to Admin UI (System Settings)
- [x] Persist MCP settings in DB
- [x] Implement Audit Logging for MCP changes
- [x] Implement Comprehensive Audit Logging for all Entities (Labels, AI, etc.)
- [x] **Settings - Administration Box**: ADD MISSING TRANSLATION <!-- id: 402 -->
- [x] **Achievements Page**: FIX TAB TRANSLATIONS <!-- id: 403 -->
- [x] **Achievements Inventory**: FIX DISPLAY AND TRANSLATION <!-- id: 404 -->
@@ -200,11 +204,26 @@
- [x] Check routing configuration
- [x] Verify sidebar navigation events
- [x] Fix Docker volume mount and PWA caching issues
- [x] Create `docker-compose-production.yml`
- [x] Configure Traefik labels
- [x] Identify Production Environment Variables
- [x] Verify Docker Build
- [x] Create `docker-compose-production.yml`
- [x] Configure Traefik labels
- [x] Identify Production Environment Variables
- [x] Verify Docker Build
- [x] Commit and Push Changes
- [x] Fix Production DB Schema (Auto-migration on startup)
- [x] Implement Automated Versioning
- [x] Create `pre-commit` hook for patch increments
- [x] Update `vite.config.ts` to expose version
- [x] Display version in Admin Settings UI
- [x] Implement Shared Labels
- [x] Schema: `sharedLabels` table
- [x] Storage: Logic for sharing and retrieving labels (MemStorage verified)
- [x] API: Routes for sharing, retrieving shares, and unsharing (Verified via Script)
- [x] UI: Share Label Modal and Integration in Settings
- [ ] Implement Reverse Proxy Support
- [x] Update `vite.config.ts` for base URL handling
- [x] Verify/Update WebSocket connection logic (`useWebSocket`) - *Configured HMR for Proxy*
+3
View File
@@ -6,6 +6,9 @@ import { fileURLToPath } from "url";
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
plugins: [
react(),
// VitePWA({...}),