Compare commits

..

3 Commits

Author SHA1 Message Date
Aiirondev_dev 0cacfb0871 Quik and more or less temporary fix for the Issue #43 further changes are not required
Release Inventarsystem / release-docker (push) Successful in 3m16s
2026-08-09 23:39:21 +02:00
Aiirondev_dev d3bfaa4580 update of an outadet approach of the user adding in the current version 2026-08-09 21:15:13 +02:00
Aiirondev_dev 36531662d3 final changes to the release edition
Release Inventarsystem / release-docker (push) Successful in 3m28s
2026-08-05 20:38:35 +02:00
3 changed files with 48 additions and 85 deletions
+48 -37
View File
@@ -42,53 +42,64 @@ jobs:
EVENT_NAME: ${{ gitea.event_name }}
REF_NAME: ${{ gitea.ref_name }}
RELEASE_TYPE: ${{ gitea.event.inputs.release_type || 'patch' }}
RUN_NUMBER: ${{ gitea.run_number }}
DOCKER_API_VERSION: '1.44'
run: |
latest_stable_tag() {
local releases_file="$1"
python3 -c "import json, sys; releases = json.load(open(sys.argv[1], encoding='utf-8')); print(next((release.get('tag_name', '').strip() for release in releases if not release.get('prerelease') and not release.get('draft')), ''))" "$releases_file"
}
next_dev_suffix() {
local releases_file="$1"
local base_tag="$2"
python3 -c "import json, re, sys; releases_path, base_tag = sys.argv[1], sys.argv[2].strip(); pattern = re.compile(r'^' + re.escape(base_tag) + r'-dev\\.(\\d+)$'); releases = json.load(open(releases_path, encoding='utf-8')); highest = max([int(match.group(1)) for release in releases for match in [pattern.match(release.get('tag_name', '').strip())] if match], default=0); print(highest + 1)" "$releases_file" "$base_tag"
}
make_dev_tag() {
local releases_file="$1"
local stable_tag="$2"
local major minor patch next_suffix
if [[ "$stable_tag" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
major=${BASH_REMATCH[1]}
minor=${BASH_REMATCH[2]}
patch=${BASH_REMATCH[3]}
else
major=0
minor=8
patch=31
fi
patch=$((patch + 1))
next_suffix="$(next_dev_suffix "$releases_file" "v${major}.${minor}.${patch}")"
printf 'v%s.%s.%s-dev.%s' "$major" "$minor" "$patch" "$next_suffix"
}
releases_file="$(mktemp)"
trap 'rm -f "${releases_file:-}"' EXIT
if [ "$EVENT_NAME" = "push" ] && [ "$REF_NAME" = "main" ]; then
prerelease=true
latest_tag="v0.8.31"
if meta_json=$(curl -fsSL -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/json" "https://git.invario-software.eu/api/v1/repos/$REPO/releases/latest" 2>/dev/null); then
tag_name=$(printf "%s" "$meta_json" | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n1)
if [ -n "$tag_name" ]; then
latest_tag="$tag_name"
fi
if ! curl -fsSL -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/json" "https://git.invario-software.eu/api/v1/repos/$REPO/releases" -o "$releases_file"; then
echo "Error: could not fetch release list"
exit 1
fi
if [[ "$latest_tag" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
major=${BASH_REMATCH[1]}
minor=${BASH_REMATCH[2]}
patch=${BASH_REMATCH[3]}
else
major=0
minor=8
patch=31
latest_tag="$(latest_stable_tag "$releases_file")"
if [ -z "$latest_tag" ]; then
latest_tag="v0.8.31"
fi
patch=$((patch + 1))
TAG="v${major}.${minor}.${patch}-dev.${RUN_NUMBER:-0}"
TAG="$(make_dev_tag "$releases_file" "$latest_tag")"
elif [ "$EVENT_NAME" = "workflow_dispatch" ] && [ "$RELEASE_TYPE" = "dev" ]; then
prerelease=true
latest_tag="v0.8.31"
if meta_json=$(curl -fsSL -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/json" "https://git.invario-software.eu/api/v1/repos/$REPO/releases/latest" 2>/dev/null); then
tag_name=$(printf "%s" "$meta_json" | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n1)
if [ -n "$tag_name" ]; then
latest_tag="$tag_name"
fi
if ! curl -fsSL -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/json" "https://git.invario-software.eu/api/v1/repos/$REPO/releases" -o "$releases_file"; then
echo "Error: could not fetch release list"
exit 1
fi
if [[ "$latest_tag" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
major=${BASH_REMATCH[1]}
minor=${BASH_REMATCH[2]}
patch=${BASH_REMATCH[3]}
else
major=0
minor=8
patch=31
latest_tag="$(latest_stable_tag "$releases_file")"
if [ -z "$latest_tag" ]; then
latest_tag="v0.8.31"
fi
patch=$((patch + 1))
TAG="v${major}.${minor}.${patch}-dev.${RUN_NUMBER:-0}"
TAG="$(make_dev_tag "$releases_file" "$latest_tag")"
elif [ "$EVENT_NAME" = "push" ] && [ -n "$REF_NAME" ]; then
prerelease=false
TAG="$REF_NAME"
View File
-48
View File
@@ -110,54 +110,6 @@
</div>
</div>
</div>
<!-- Filter 3 -->
<div class="col-md-4">
<div class="card mb-4">
<div class="card-header">
<h2 class="card-title h5 mb-0">{{ filter_names.get('3', 'Typ/Art') }} (Filter 3)</h2>
</div>
<div class="card-body">
<form method="POST" action="{{ url_for('add_filter_value', filter_num=3) }}" class="mb-4">
<div class="input-group">
<input type="text" name="value" class="form-control" placeholder="Neuer Wert..." required>
<button type="submit" class="btn btn-primary">Hinzufügen</button>
</div>
</form>
<h5 class="mb-3">Vorhandene Werte</h5>
{% if filter3_values %}
<div class="list-group">
{% for value in filter3_values %}
<div class="list-group-item">
<div class="d-flex justify-content-between align-items-center mb-2">
<span>{{ value }}</span>
<div>
<button type="button" class="btn btn-sm btn-secondary me-1" onclick="toggleEdit('edit-3-{{ loop.index }}')">Bearbeiten</button>
<form method="POST" action="{{ url_for('remove_filter_value', filter_num=3, value=value) }}" class="d-inline">
<button type="submit" class="btn btn-sm btn-danger"
onclick="return confirm('Sind Sie sicher, dass Sie den Wert \"' + '{{ value }}'.replace(/'/g, '\\\'') + '\" löschen möchten?');">
Entfernen
</button>
</form>
</div>
</div>
<form id="edit-3-{{ loop.index }}" method="POST" action="{{ url_for('edit_filter_value', filter_num=3, old_value=value) }}" style="display: none;" class="mt-2">
<div class="input-group input-group-sm">
<input type="text" name="new_value" class="form-control" value="{{ value }}" required>
<button type="submit" class="btn btn-primary" onclick="return confirm('Tipp: Das Ändern des Namens aktualisiert auch alle Einträge in der Datenbank, die diesen Filter verwenden. Fortfahren?');">Speichern</button>
<button type="button" class="btn btn-secondary" onclick="toggleEdit('edit-3-{{ loop.index }}')">Abbrechen</button>
</div>
</form>
</div>
{% endfor %}
</div>
{% else %}
<div class="alert alert-info">Keine Werte definiert.</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="alert alert-warning">