feat: git SHA version badge in admin, fix finanzplan caching, drop gitea remote
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m4s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 28s
CI / test-python-voice (push) Successful in 28s
CI / test-bqas (push) Successful in 26s
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m4s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 28s
CI / test-python-voice (push) Successful in 28s
CI / test-bqas (push) Successful in 26s
- AdminShell: shows NEXT_PUBLIC_GIT_SHA in sidebar footer - Dockerfile + build-pitch-deck.yml: pass --build-arg GIT_SHA at build time - FinanzplanSlide: fetch with cache:no-store to always show current DB values - finanzplan routes: Cache-Control: no-store to prevent CDN/proxy staling - CLAUDE.md: remove dead gitea remote (only origin exists) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
```bash
|
```bash
|
||||||
# 1. Code auf MacBook bearbeiten (dieses Verzeichnis)
|
# 1. Code auf MacBook bearbeiten (dieses Verzeichnis)
|
||||||
# 2. Committen und zu BEIDEN Remotes pushen:
|
# 2. Committen und zu BEIDEN Remotes pushen:
|
||||||
git push origin main && git push gitea main
|
git push origin main
|
||||||
|
|
||||||
# 3. FERTIG! Push auf gitea triggert automatisch:
|
# 3. FERTIG! Push auf gitea triggert automatisch:
|
||||||
# - Gitea Actions: Tests
|
# - Gitea Actions: Tests
|
||||||
@@ -253,7 +253,7 @@ ssh macmini "/usr/local/bin/docker logs -f bp-core-control-pipeline"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Committen und pushen → Orca deployt automatisch:
|
# Committen und pushen → Orca deployt automatisch:
|
||||||
git push origin main && git push gitea main
|
git push origin main
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lokale Docker-Befehle (Mac Mini — nur Dev/Tests)
|
### Lokale Docker-Befehle (Mac Mini — nur Dev/Tests)
|
||||||
@@ -278,11 +278,11 @@ ssh macmini "/usr/local/bin/docker ps --filter name=bp-core"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Zu BEIDEN Remotes pushen (PFLICHT!):
|
# Zu BEIDEN Remotes pushen (PFLICHT!):
|
||||||
git push origin main && git push gitea main
|
git push origin main
|
||||||
|
|
||||||
# Remotes:
|
# Remotes:
|
||||||
# origin: lokale Gitea (macmini:3003)
|
|
||||||
# gitea: gitea.meghsakha.com
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ jobs:
|
|||||||
cd pitch-deck
|
cd pitch-deck
|
||||||
SHORT_SHA=$(git rev-parse --short HEAD)
|
SHORT_SHA=$(git rev-parse --short HEAD)
|
||||||
docker build \
|
docker build \
|
||||||
|
--build-arg GIT_SHA=${SHORT_SHA} \
|
||||||
-t registry.meghsakha.com/breakpilot/pitch-deck:latest \
|
-t registry.meghsakha.com/breakpilot/pitch-deck:latest \
|
||||||
-t registry.meghsakha.com/breakpilot/pitch-deck:${SHORT_SHA} \
|
-t registry.meghsakha.com/breakpilot/pitch-deck:${SHORT_SHA} \
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ RUN npm install
|
|||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Embed git commit hash into build
|
||||||
|
ARG GIT_SHA=dev
|
||||||
|
ENV GIT_SHA=$GIT_SHA
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ export async function GET(
|
|||||||
query += ' ORDER BY sort_order'
|
query += ' ORDER BY sort_order'
|
||||||
|
|
||||||
const { rows } = await pool.query(query, params)
|
const { rows } = await pool.query(query, params)
|
||||||
return NextResponse.json({ sheet: sheetName, rows })
|
return NextResponse.json({ sheet: sheetName, rows }, {
|
||||||
|
headers: { 'Cache-Control': 'no-store' },
|
||||||
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json({ error: String(error) }, { status: 500 })
|
return NextResponse.json({ error: String(error) }, { status: 500 })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ export async function GET() {
|
|||||||
sheets,
|
sheets,
|
||||||
scenarios: scenarios.rows,
|
scenarios: scenarios.rows,
|
||||||
months: { start: '2026-01', end: '2030-12', count: 60, founding: '2026-08' },
|
months: { start: '2026-01', end: '2030-12', count: 60, founding: '2026-08' },
|
||||||
|
}, {
|
||||||
|
headers: { 'Cache-Control': 'no-store' },
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json({ error: String(error) }, { status: 500 })
|
return NextResponse.json({ error: String(error) }, { status: 500 })
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ export default function AdminShell({ admin, children }: AdminShellProps) {
|
|||||||
<div className="px-3 py-2 mb-2">
|
<div className="px-3 py-2 mb-2">
|
||||||
<div className="text-sm font-medium text-white/90 truncate">{admin.name}</div>
|
<div className="text-sm font-medium text-white/90 truncate">{admin.name}</div>
|
||||||
<div className="text-xs text-white/40 truncate">{admin.email}</div>
|
<div className="text-xs text-white/40 truncate">{admin.email}</div>
|
||||||
|
<div className="mt-1.5 flex items-center gap-1.5">
|
||||||
|
<span className="text-[9px] font-mono bg-white/[0.06] text-white/30 px-1.5 py-0.5 rounded">
|
||||||
|
{process.env.NEXT_PUBLIC_GIT_SHA ?? 'dev'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
onClick={logout}
|
onClick={logout}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId
|
|||||||
|
|
||||||
// Load sheet list
|
// Load sheet list
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('/api/finanzplan')
|
fetch('/api/finanzplan', { cache: 'no-store' })
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.then(data => setSheets(data.sheets || []))
|
.then(data => setSheets(data.sheets || []))
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
@@ -99,7 +99,7 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId
|
|||||||
}
|
}
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
try {
|
try {
|
||||||
const r = await fetch(`/api/finanzplan/${name}${fpScenarioParam}`)
|
const r = await fetch(`/api/finanzplan/${name}${fpScenarioParam}`, { cache: 'no-store' })
|
||||||
const data = await r.json()
|
const data = await r.json()
|
||||||
setRows(data.rows || [])
|
setRows(data.rows || [])
|
||||||
} catch { /* ignore */ }
|
} catch { /* ignore */ }
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
|
env: {
|
||||||
|
NEXT_PUBLIC_GIT_SHA: process.env.GIT_SHA || 'dev',
|
||||||
|
},
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
typescript: {
|
typescript: {
|
||||||
ignoreBuildErrors: true,
|
ignoreBuildErrors: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user