-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhero8_run.sh
More file actions
executable file
·61 lines (49 loc) · 1.51 KB
/
hero8_run.sh
File metadata and controls
executable file
·61 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# hero8_run.sh - Hauptskript für hero8-Projekt
# Angelegt am: 2025-04-19
# Projektverzeichnis als Basis
PROJECT_ROOT="/Users/ninaklee/Projects/hero8"
# Funktion zur Aktualisierung der Dokumentation
update_docs() {
local message="$1"
echo "Aktualisiere Dokumentation..."
# Timestamp für Dokumentation
timestamp=$(date "+%Y-%m-%d_%H-%M-%S")
# Neues Übergabedokument erstellen
doc_file="$PROJECT_ROOT/Dokumentation/KI-UEBERGABE-${timestamp}.md"
echo "# hero8 KI-Übergabe (${timestamp})" > "$doc_file"
echo "" >> "$doc_file"
echo "## Beschreibung" >> "$doc_file"
echo "$message" >> "$doc_file"
echo "" >> "$doc_file"
echo "## Aktueller Stand" >> "$doc_file"
# Kopiere den Inhalt der letzten Übergabe
latest_uebergabe=$(ls -t "$PROJECT_ROOT/Dokumentation/KI-UEBERGABE-"*.md 2>/dev/null | head -n 1)
if [ -f "$latest_uebergabe" ]; then
tail -n +3 "$latest_uebergabe" >> "$doc_file"
fi
echo "Dokumentation aktualisiert: $doc_file"
}
# Funktion zum Pushen der Änderungen
push_changes() {
local message="$1"
echo "Speichere Änderungen..."
cd "$PROJECT_ROOT"
git add .
git commit -m "$message"
git push
echo "Änderungen gespeichert und gepusht!"
}
# Hauptprogramm
case "$1" in
"update_docs")
update_docs "$2"
;;
"push_changes")
push_changes "$2"
;;
*)
echo "Verwendung: $0 {update_docs|push_changes} [Nachricht]"
exit 1
;;
esac