Web-Ide mit aufgenommen

This commit is contained in:
Riwoldt
2026-04-09 14:14:56 +02:00
parent 64816c45cc
commit 15cfaf332d
489 changed files with 186891 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/bash
set -e # Exit on errors
set -x # Shell debugging
# CURRENT and NEXT have the format YYYY.WW.REV, where YYYY is the current year,
# WW is the current week, and REV is the number of releases this week.
# The next revision compares the two, in this way
# - If NEXT is later than CURRENT in any fields, accept NEXT.
# - Otherwise, return CURRENT, with one added to REV.
#
# THIS FUNCTION IS NOT TRANSITIVE! It must be called with
# `compare_versions CURRENT NEXT`
compare_versions() {
if [[ "$1" < "$2" ]]; then
echo "$2"
else
IFS='.' read -r y1 w1 r1 <<<"$1"
r1=$((r1 + 1))
echo "${y1}.${w1}.${r1}"
fi
}
# compare_versions 2024.44.4 2024.44.0 # 2024.44.5
# compare_versions 2024.44.4 2024.45.0 # 2024.45.0
# compare_versions 2024.44.4 2025.1.0 # 2025.1.0
CURRENT=$(grep version package.json | awk -F\" '{print $4}')
NEXT=$(date +%Y.%W.0)
VERSION=$(compare_versions "$CURRENT" "$NEXT")
echo "Releasing $VERSION..."
npm version "$VERSION" --include-workspace-root --no-git-tag-version
sed "/version/ s/$CURRENT/$VERSION/" web/public/index.html > web/public/index.html.out ; mv web/public/index.html.out web/public/index.html
git --no-pager diff
git add .
git commit --message "Release ${VERSION}"