feat: Update version handling in release workflow and improve directory creation

This commit is contained in:
2026-05-20 18:23:34 +02:00
parent a7ff2f1552
commit 0ea1294237
3 changed files with 22 additions and 7 deletions
+19
View File
@@ -134,14 +134,22 @@ jobs:
echo "push_dev=false" >> "$GITHUB_OUTPUT" echo "push_dev=false" >> "$GITHUB_OUTPUT"
fi fi
- name: Update .release-version file
run: |
echo "${{ steps.meta.outputs.tag }}" > .release-version
cat .release-version
- name: Create and push tag for manual releases - name: Create and push tag for manual releases
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
run: | run: |
TAG="${{ steps.meta.outputs.tag }}" TAG="${{ steps.meta.outputs.tag }}"
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
git add .release-version
git commit -m "chore: bump version to $TAG" || true
git tag "$TAG" git tag "$TAG"
git push origin "$TAG" git push origin "$TAG"
git push origin HEAD:${{ github.ref_name }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@@ -198,6 +206,17 @@ jobs:
# development tar omitted: dev releases will be versioned (vX.Y.Z-dev) and handled by update.sh using the tag # development tar omitted: dev releases will be versioned (vX.Y.Z-dev) and handled by update.sh using the tag
- name: Commit .release-version for tag pushes
if: github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet .release-version; then
git add .release-version
git commit -m "chore: update version to ${{ steps.meta.outputs.tag }}"
git push origin HEAD:${{ github.ref_name }}
fi
- name: Create release-only docker bundle - name: Create release-only docker bundle
run: | run: |
mkdir -p release-bundle mkdir -p release-bundle
+2 -6
View File
@@ -120,7 +120,7 @@ app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1)
"""--------------------------------------------------------------Path Init-------------------------------------------------------""" """--------------------------------------------------------------Path Init-------------------------------------------------------"""
if not os.path.exists(app.config['UPLOAD_FOLDER']): if not os.path.exists(app.config['UPLOAD_FOLDER']):
os.makedirs(app.config['UPLOAD_FOLDER']) os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
# QR Code directory creation deactivated # QR Code directory creation deactivated
# if not os.path.exists(app.config['QR_CODE_FOLDER']): # if not os.path.exists(app.config['QR_CODE_FOLDER']):
# os.makedirs(app.config['QR_CODE_FOLDER']) # os.makedirs(app.config['QR_CODE_FOLDER'])
@@ -2415,11 +2415,7 @@ def preview_file(filename):
if denied: if denied:
return denied return denied
# Check production path first
prod_path = "/var/Inventarsystem/Web/previews"
dev_path = app.config['PREVIEW_FOLDER'] dev_path = app.config['PREVIEW_FOLDER']
if os.path.exists(os.path.join(prod_path, filename)):
return send_from_directory(prod_path, filename)
if os.path.exists(os.path.join(dev_path, filename)): if os.path.exists(os.path.join(dev_path, filename)):
return send_from_directory(dev_path, filename) return send_from_directory(dev_path, filename)
@@ -2798,7 +2794,7 @@ def library_export_excel(scope='all'):
client.close() client.close()
excel_file = excel_export.generate_library_excel(items) excel_file = excel_export.generate_library_excel(items)
return flask.send_file( return send_file(
excel_file, excel_file,
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
as_attachment=True, as_attachment=True,
+1 -1
View File
@@ -1 +1 @@
# Web.modules.logs package initialization # Web.modules.log package initialization