|
|
@ -221,10 +221,15 @@ gitChange(){ |
|
|
|
if ! git diff --exit-code "$filename" > /dev/null 2>&1; then |
|
|
|
if ! git diff --exit-code "$filename" > /dev/null 2>&1; then |
|
|
|
# Changes |
|
|
|
# Changes |
|
|
|
git add "$filename" |
|
|
|
git add "$filename" |
|
|
|
|
|
|
|
[ -e "$filename.yaml" ] && git add "$filename.yaml" |
|
|
|
git commit -m "KB auto-commit: Updated: $filename" |
|
|
|
git commit -m "KB auto-commit: Updated: $filename" |
|
|
|
|
|
|
|
elif [ -e "$filename.yaml" ] && ! git diff --exit-code "$filename.yaml" > /dev/null 2>&1; then |
|
|
|
|
|
|
|
git add "$filename.yaml" |
|
|
|
|
|
|
|
git commit -m "KB auto-commit: Updated: $filename.yaml" |
|
|
|
elif ! git ls-files --error-unmatch "$filename" > /dev/null 2>&1; then |
|
|
|
elif ! git ls-files --error-unmatch "$filename" > /dev/null 2>&1; then |
|
|
|
# New file |
|
|
|
# New file |
|
|
|
git add "$filename" |
|
|
|
git add "$filename" |
|
|
|
|
|
|
|
[ -e "$filename.yaml" ] && git add "$filename.yaml" |
|
|
|
git commit -m "KB auto-commit: New: $filename" |
|
|
|
git commit -m "KB auto-commit: New: $filename" |
|
|
|
fi |
|
|
|
fi |
|
|
|
else |
|
|
|
else |
|
|
@ -235,6 +240,7 @@ gitChange(){ |
|
|
|
else |
|
|
|
else |
|
|
|
# if we get here, the file has been deleted |
|
|
|
# if we get here, the file has been deleted |
|
|
|
git add "$filename" |
|
|
|
git add "$filename" |
|
|
|
|
|
|
|
git add "$filename.yaml" |
|
|
|
git commit -m "KB auto-commit: delete: $filename" |
|
|
|
git commit -m "KB auto-commit: delete: $filename" |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|