🚀 NEUE FEATURES: Push-to-Gitea, Inotify-Watcher, Changelog mit git log
docker-build-and-push / build (push) Successful in 1m54s
docker-build-and-push / build (push) Successful in 1m54s
This commit is contained in:
+13
-3
@@ -109,8 +109,13 @@ def unsubscribe_repo(project_name: str, projects_dir: Path):
|
||||
return {"success": False, "error": f"Konnte nicht loeschen: {e}"}
|
||||
|
||||
|
||||
def push_changes(repo_path: Path, message: str = "Update 🧠"):
|
||||
"""Pusht lokale Änderungen ins Repository."""
|
||||
def push_changes(repo_path: Path, message: str = "Update 🧠", changelog_content: str = None):
|
||||
"""Pusht lokale Änderungen ins Repository mit optionalem Changelog-Content."""
|
||||
# Optional: Changelog aktualisieren
|
||||
if changelog_content:
|
||||
changelog_path = repo_path / "CHANGELOG.md"
|
||||
changelog_path.write_text(changelog_content)
|
||||
|
||||
result = subprocess.run(
|
||||
["git", "add", "."], cwd=repo_path, capture_output=True, text=True
|
||||
)
|
||||
@@ -118,8 +123,13 @@ def push_changes(repo_path: Path, message: str = "Update 🧠"):
|
||||
if result.returncode != 0:
|
||||
return {"success": False, "error": f"git add fehlgeschlagen: {result.stderr}"}
|
||||
|
||||
# Commit message mit optionaler Info aus Changelog
|
||||
commit_msg = message
|
||||
if changelog_content:
|
||||
commit_msg += "\n\nChangelog aktualisiert"
|
||||
|
||||
result = subprocess.run(
|
||||
["git", "commit", "-m", message], cwd=repo_path, capture_output=True, text=True
|
||||
["git", "commit", "-m", commit_msg], cwd=repo_path, capture_output=True, text=True
|
||||
)
|
||||
|
||||
if result.returncode != 0 and "nothing to commit" not in result.stderr.lower():
|
||||
|
||||
Reference in New Issue
Block a user