chore: zentrale Versionsverwaltung verbessert und appVersion.js entfernt

- Versionsnummer wird nun automatisch in package.json, package-lock.json, .env.development und .env.production aktualisiert
- appVersion.js entfernt, da die Version nun direkt über process.env.NEXT_PUBLIC_APP_VERSION verwendet wird
- bumpVersion-Skript aktualisiert und vereinfacht
- Vorbereitungen für klarere Versionshistorie und Releases
This commit is contained in:
ISA
2025-06-17 13:55:27 +02:00
parent b4c5aca8c9
commit 23ec079eb9
8 changed files with 63 additions and 45 deletions

View File

@@ -11,7 +11,7 @@ import PoiUpdateModal from "@/components/pois/poiUpdateModal/PoiUpdateModal.js";
import { ToastContainer, toast } from "react-toastify";
import plusRoundIcon from "../icons/devices/overlapping/PlusRoundIcon.js";
import { restoreMapSettings, checkOverlappingMarkers } from "../../utils/mapUtils.js";
import { APP_VERSION } from "@/config/appVersion.js";
import addItemsToMapContextMenu from "@/components/contextmenu/useMapContextMenu.js";
import useAreaMarkersLayer from "@/hooks/useAreaMarkersLayer.js";
import { setupPolylines } from "@/utils/polylines/setupPolylines.js";
@@ -87,6 +87,7 @@ import { setGisStationsStaticDistrict } from "@/redux/slices/webservice/gisStati
//-----------------------------------------------------------------------------------------------------
const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
//-------------------------------
const appVersion = process.env.NEXT_PUBLIC_APP_VERSION;
const dispatch = useDispatch();
// useDataUpdater();
const [triggerUpdate, setTriggerUpdate] = useState(false);
@@ -915,7 +916,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
<div>
<span className="text-black text-lg font-semibold"> TALAS.Map </span>
<br />
<span className="text-black text-lg">Version {APP_VERSION}</span>
<span className="text-black text-lg">Version {appVersion}</span>
</div>
<div>
<button onClick={openVersionInfoModal}>
@@ -927,7 +928,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
<VersionInfoModal
showVersionInfoModal={showVersionInfoModal}
closeVersionInfoModal={closeVersionInfoModal}
APP_VERSION={APP_VERSION}
APP_VERSION={appVersion}
/>
</>
);

View File

@@ -2,22 +2,37 @@
import React from "react";
const VersionInfoModal = ({ showVersionInfoModal, closeVersionInfoModal, APP_VERSION }) => {
const appVersion = process.env.NEXT_PUBLIC_APP_VERSION;
return (
<>
{showVersionInfoModal && (
<div className="fixed inset-0 flex items-center justify-center z-50">
<div className="fixed inset-0 bg-black bg-opacity-50" onClick={closeVersionInfoModal}></div>
<div
className="fixed inset-0 bg-black bg-opacity-50"
onClick={closeVersionInfoModal}
></div>
<div className="bg-white p-6 rounded-lg shadow-lg z-60 max-w-lg mx-auto">
<img src="img/Logo_TALAS.png" alt="TALAS V5 Logo" className="w-1/2 mx-auto my-4" />
<div className="bg-white border p-6 rounded-lg shadow-lg z-60 max-w-lg mx-auto">
<h2 className="text-xl font-bold mb-6 text-start leading-tight">Littwin Systemtechnik GmbH & Co. KG</h2>
<h4 className="text-lg font-bold mb-2 text-start leading-tight">Bürgermeister-Brötje Str. 28</h4>
<h2 className="text-xl font-bold mb-6 text-start leading-tight">
Littwin Systemtechnik GmbH & Co. KG
</h2>
<h4 className="text-lg font-bold mb-2 text-start leading-tight">
Bürgermeister-Brötje Str. 28
</h4>
<h4 className="text-lg font-bold mb-2 text-start leading-tight">D-26180 Rastede</h4>
<h5 className="text-md mb-2 text-start leading-snug">T: +49 4402 9725 77-0</h5>
<h5 className="text-md mb-2 text-start leading-snug">E: kontakt@littwin-systemtechnik.de</h5>
<h5 className="text-md mb-2 text-start leading-snug">
E: kontakt@littwin-systemtechnik.de
</h5>
</div>
<p className="text-gray-700 text-center font-bold mt-4 leading-relaxed">TALAS.Map Version {APP_VERSION}</p>
<button onClick={closeVersionInfoModal} className="mt-4 bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-700 mx-auto block">
<p className="text-gray-700 text-center font-bold mt-4 leading-relaxed">
TALAS.Map Version {appVersion}
</p>
<button
onClick={closeVersionInfoModal}
className="mt-4 bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-700 mx-auto block"
>
Schließen
</button>
</div>