major fixes

This commit is contained in:
fabolous005 2025-12-29 05:57:28 +01:00
parent 58b788ac80
commit de176bf985
3 changed files with 5 additions and 3 deletions

View File

@ -6,6 +6,7 @@
return 1;
cd /var/src/teatrader
git checkout main
git pull
cargo build --release

View File

@ -6,8 +6,9 @@
return 1;
cd /var/src/teatrader
tag=$(curl -s $GITEA/api/v1/repos/$OWNER/$REPO/releases/latest \
| jq -r .tag_name)
tag=$(curl -s -H "Authorization: token $(cat ~/.webbump-secret)" \
https://git.engler-labs.root64.de/api/v1/repos/fabolous005/teatrader/releases/latest |\
jq -r .tag_name)
git checkout "$tag"

View File

@ -58,7 +58,7 @@ def gitea_webhook():
try:
subprocess.run([script_path, *args], check=True)
except subprocess.CalledProcessError as e:
logger.error(repo_name + " " + script_name + " script failed with exit code: " + e)
logger.error(repo_name + " " + event_type + " script failed with exit code: " + e)
return jsonify({"error": f"Script failed: {e}"}), 500
logger.info("Script executed successfully")