Compare commits
4 Commits
accdccf897
...
v1.4.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4a8a47ccd | ||
|
|
8e8c93410b | ||
|
|
cca59bcace | ||
|
|
432bbcb6f2 |
@@ -267,23 +267,4 @@ if [ $TEST_EXIT -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
echo "✅ All build tests passed."
|
echo "✅ All build tests passed."
|
||||||
|
|
||||||
# === 5. Commit, tag, and push ===
|
|
||||||
echo ""
|
|
||||||
echo "=== Committing & Pushing ==="
|
|
||||||
git add -A
|
|
||||||
git commit -m "dist files for $VERSION built" --allow-empty
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "=== Tagging $VERSION ==="
|
|
||||||
if git rev-parse "$VERSION" >/dev/null 2>&1; then
|
|
||||||
git tag -f "$VERSION"
|
|
||||||
echo "🔄 Tag $VERSION moved to current commit."
|
|
||||||
else
|
|
||||||
git tag "$VERSION"
|
|
||||||
echo "✅ Created tag: $VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git push
|
|
||||||
git push origin --force tag "$VERSION"
|
|
||||||
git push github --force tag "$VERSION"
|
|
||||||
echo "✅ Pushed commit + tag $VERSION"
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
## v1.4.11 (2026-02-24)
|
||||||
|
- **Feature**: Das Versionsmenü prüft nun im Hintergrund direkt beim Öffnen nach neuen Versionen und aktualisiert die Liste automatisch, selbst wenn eine veraltete Liste noch im Cache liegt.
|
||||||
|
|
||||||
## v1.4.10 (2026-02-24)
|
## v1.4.10 (2026-02-24)
|
||||||
- **Fix**: Die Farben der Benachrichtigungs-Glocke wurden korrigiert: Sie ist nun gelb, während man auf ein Menü wartet, und wird grün, sobald eines verfügbar ist.
|
- **Fix**: Die Farben der Benachrichtigungs-Glocke wurden korrigiert: Sie ist nun gelb, während man auf ein Menü wartet, und wird grün, sobald eines verfügbar ist.
|
||||||
|
|
||||||
|
|||||||
2
dist/bookmarklet-payload.js
vendored
2
dist/bookmarklet-payload.js
vendored
File diff suppressed because one or more lines are too long
2
dist/bookmarklet.txt
vendored
2
dist/bookmarklet.txt
vendored
File diff suppressed because one or more lines are too long
16
dist/install.html
vendored
16
dist/install.html
vendored
File diff suppressed because one or more lines are too long
51
dist/kantine-standalone.html
vendored
51
dist/kantine-standalone.html
vendored
@@ -2021,7 +2021,7 @@ body {
|
|||||||
<div class="brand">
|
<div class="brand">
|
||||||
<span class="material-icons-round logo-icon">restaurant_menu</span>
|
<span class="material-icons-round logo-icon">restaurant_menu</span>
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<h1>Kantinen Übersicht <small class="version-tag" style="font-size: 0.6em; opacity: 0.7; font-weight: 400; cursor: pointer;" title="Klick für Versionsmenü">v1.4.10</small></h1>
|
<h1>Kantinen Übersicht <small class="version-tag" style="font-size: 0.6em; opacity: 0.7; font-weight: 400; cursor: pointer;" title="Klick für Versionsmenü">v1.4.11</small></h1>
|
||||||
<div id="last-updated-subtitle" class="subtitle"></div>
|
<div id="last-updated-subtitle" class="subtitle"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-group" style="margin-left: 1rem;">
|
<div class="nav-group" style="margin-left: 1rem;">
|
||||||
@@ -2163,7 +2163,7 @@ body {
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div style="margin-bottom: 1rem;">
|
<div style="margin-bottom: 1rem;">
|
||||||
<strong>Aktuell:</strong> <span id="version-current">v1.4.10</span>
|
<strong>Aktuell:</strong> <span id="version-current">v1.4.11</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dev-toggle">
|
<div class="dev-toggle">
|
||||||
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
|
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
|
||||||
@@ -3893,7 +3893,7 @@ body {
|
|||||||
|
|
||||||
// Periodic update check (runs on init + every hour)
|
// Periodic update check (runs on init + every hour)
|
||||||
async function checkForUpdates() {
|
async function checkForUpdates() {
|
||||||
const currentVersion = 'v1.4.10';
|
const currentVersion = 'v1.4.11';
|
||||||
const devMode = localStorage.getItem('kantine_dev_mode') === 'true';
|
const devMode = localStorage.getItem('kantine_dev_mode') === 'true';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -3934,7 +3934,7 @@ body {
|
|||||||
const modal = document.getElementById('version-modal');
|
const modal = document.getElementById('version-modal');
|
||||||
const container = document.getElementById('version-list-container');
|
const container = document.getElementById('version-list-container');
|
||||||
const devToggle = document.getElementById('dev-mode-toggle');
|
const devToggle = document.getElementById('dev-mode-toggle');
|
||||||
const currentVersion = 'v1.4.10';
|
const currentVersion = 'v1.4.11';
|
||||||
|
|
||||||
if (!modal) return;
|
if (!modal) return;
|
||||||
modal.classList.remove('hidden');
|
modal.classList.remove('hidden');
|
||||||
@@ -3952,19 +3952,8 @@ body {
|
|||||||
const dm = devToggle.checked;
|
const dm = devToggle.checked;
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
||||||
|
|
||||||
try {
|
function renderVersionsList(versions) {
|
||||||
let versions;
|
if (!versions || !versions.length) {
|
||||||
const cached = JSON.parse(localStorage.getItem('kantine_version_cache') || 'null');
|
|
||||||
if (!forceRefresh && cached && cached.devMode === dm && (Date.now() - cached.timestamp < 3600000)) {
|
|
||||||
versions = cached.versions;
|
|
||||||
} else {
|
|
||||||
versions = await fetchVersions(dm);
|
|
||||||
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
|
||||||
timestamp: Date.now(), devMode: dm, versions
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!versions.length) {
|
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3996,6 +3985,34 @@ body {
|
|||||||
`;
|
`;
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. Show cached versions immediately if available
|
||||||
|
const cachedRaw = localStorage.getItem('kantine_version_cache');
|
||||||
|
let cached = null;
|
||||||
|
if (cachedRaw) {
|
||||||
|
try { cached = JSON.parse(cachedRaw); } catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cached && cached.devMode === dm && cached.versions) {
|
||||||
|
renderVersionsList(cached.versions);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Fetch fresh versions in background (or foreground if no cache)
|
||||||
|
const liveVersions = await fetchVersions(dm);
|
||||||
|
|
||||||
|
// Compare with cache to see if we need to re-render
|
||||||
|
const liveVersionsStr = JSON.stringify(liveVersions);
|
||||||
|
const cachedVersionsStr = cached ? JSON.stringify(cached.versions) : '';
|
||||||
|
|
||||||
|
if (liveVersionsStr !== cachedVersionsStr) {
|
||||||
|
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
||||||
|
timestamp: Date.now(), devMode: dm, versions: liveVersions
|
||||||
|
}));
|
||||||
|
renderVersionsList(liveVersions);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
||||||
}
|
}
|
||||||
|
|||||||
43
kantine.js
43
kantine.js
@@ -2002,19 +2002,8 @@
|
|||||||
const dm = devToggle.checked;
|
const dm = devToggle.checked;
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
||||||
|
|
||||||
try {
|
function renderVersionsList(versions) {
|
||||||
let versions;
|
if (!versions || !versions.length) {
|
||||||
const cached = JSON.parse(localStorage.getItem('kantine_version_cache') || 'null');
|
|
||||||
if (!forceRefresh && cached && cached.devMode === dm && (Date.now() - cached.timestamp < 3600000)) {
|
|
||||||
versions = cached.versions;
|
|
||||||
} else {
|
|
||||||
versions = await fetchVersions(dm);
|
|
||||||
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
|
||||||
timestamp: Date.now(), devMode: dm, versions
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!versions.length) {
|
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2046,6 +2035,34 @@
|
|||||||
`;
|
`;
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. Show cached versions immediately if available
|
||||||
|
const cachedRaw = localStorage.getItem('kantine_version_cache');
|
||||||
|
let cached = null;
|
||||||
|
if (cachedRaw) {
|
||||||
|
try { cached = JSON.parse(cachedRaw); } catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cached && cached.devMode === dm && cached.versions) {
|
||||||
|
renderVersionsList(cached.versions);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Fetch fresh versions in background (or foreground if no cache)
|
||||||
|
const liveVersions = await fetchVersions(dm);
|
||||||
|
|
||||||
|
// Compare with cache to see if we need to re-render
|
||||||
|
const liveVersionsStr = JSON.stringify(liveVersions);
|
||||||
|
const cachedVersionsStr = cached ? JSON.stringify(cached.versions) : '';
|
||||||
|
|
||||||
|
if (liveVersionsStr !== cachedVersionsStr) {
|
||||||
|
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
||||||
|
timestamp: Date.now(), devMode: dm, versions: liveVersions
|
||||||
|
}));
|
||||||
|
renderVersionsList(liveVersions);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
||||||
}
|
}
|
||||||
|
|||||||
58
release.sh
Executable file
58
release.sh
Executable file
@@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# release.sh - Deploys a new version of the Kantine Wrapper
|
||||||
|
|
||||||
|
# Ensure we're in the script directory
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
|
# Ensure tests have run and artifacts exist
|
||||||
|
if [ ! -d "$SCRIPT_DIR/dist" ]; then
|
||||||
|
echo "❌ Error: dist folder missing. Please run build-bookmarklet.sh first"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get current version
|
||||||
|
VERSION=$(cat "version.txt" | tr -d '\n\r ')
|
||||||
|
|
||||||
|
# Validate that version is set
|
||||||
|
if [ -z "$VERSION" ]; then
|
||||||
|
echo "❌ Error: Could not determine version from version.txt"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== Kantine Bookmarklet Releaser ($VERSION) ==="
|
||||||
|
|
||||||
|
# Check for uncommitted changes (excluding dist/)
|
||||||
|
if ! git diff-index --quiet HEAD -- ":(exclude)dist"; then
|
||||||
|
echo "⚠️ Warning: You have uncommitted changes in the working directory."
|
||||||
|
echo "Please commit your code changes before running the release script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== Committing build artifacts ==="
|
||||||
|
git add "dist/"
|
||||||
|
git commit -m "chore: update build artifacts for $VERSION" --allow-empty
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== Tagging $VERSION ==="
|
||||||
|
if git rev-parse "$VERSION" >/dev/null 2>&1; then
|
||||||
|
git tag -f "$VERSION"
|
||||||
|
echo "🔄 Tag $VERSION moved to current commit."
|
||||||
|
else
|
||||||
|
git tag "$VERSION"
|
||||||
|
echo "✅ Created tag: $VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== Pushing to remotes ==="
|
||||||
|
# Determine remote targets: Assume 'origin' for primary, optionally 'github'
|
||||||
|
git push origin HEAD
|
||||||
|
git push origin --force tag "$VERSION"
|
||||||
|
|
||||||
|
# If a remote named 'github' exists, push tags there too
|
||||||
|
if git remote | grep -q "^github$"; then
|
||||||
|
git push github --force tag "$VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🎉 Successfully released version $VERSION!"
|
||||||
|
exit 0
|
||||||
@@ -1 +1 @@
|
|||||||
v1.4.10
|
v1.4.11
|
||||||
|
|||||||
Reference in New Issue
Block a user