Files
ViewIT/scripts/hooks/post-commit

25 lines
590 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# post-commit: ZIP bauen, pushen, Gitea-Release veröffentlichen (nur dev-Branch)
branch=$(git symbolic-ref --short HEAD 2>/dev/null)
[[ "$branch" != "dev" ]] && exit 0
root=$(git rev-parse --show-toplevel)
cd "$root"
# ZIP bauen
echo "[hook] Baue ZIP..."
bash scripts/build_kodi_zip.sh
# Push
echo "[hook] Push origin dev..."
git push origin dev
# Gitea Release
if [[ -n "$GITEA_TOKEN" ]]; then
echo "[hook] Veröffentliche Gitea-Release..."
bash scripts/publish_gitea_release.sh
else
echo "[hook] GITEA_TOKEN nicht gesetzt Gitea-Release übersprungen"
fi