Configure git client before start sync

Signed-off-by: Miguel A. Cabrera Minagorri <mcabrera@vmware.com>
This commit is contained in:
Miguel A. Cabrera Minagorri
2022-04-12 12:55:35 +02:00
parent 5d9a58e7a1
commit 06e4aeda18

View File

@@ -37,12 +37,9 @@ function getContainerRepos() {
}
# Commits a directory
function commitChanges() {
function gitConfigure() {
git config user.name "Bitnami Containers"
git config user.email "containers@bitnami.com"
# git diff --exit-code --quiet <commit-A> <commit-b>
git diff --exit-code || (git add -A && git commit -m "Sync ${name} files")
}
function pushChanges() {
@@ -89,6 +86,8 @@ syncCommit() {
function syncRepos() {
local -r repos="$(getContainerRepos)"
gitConfigure # Configure Git client
mkdir -p "$TARGET_DIR"
# Build array of app names since we need to exclude them when moving files