add check of staged files so as not to add extra files to the commit
This commit is contained in:
parent
ddc0bb2fd3
commit
a94ed5b3a7
9
builder
9
builder
@ -1048,8 +1048,13 @@ function update_by_git ()
|
||||
if git pull origin master --tags; then
|
||||
Version="$(version)"
|
||||
pushd "$MutSource" &> /dev/null
|
||||
git add "$ScriptDir" &> /dev/null
|
||||
git commit -m "update build tools to $Version"
|
||||
if [[ -z "$(git diff --name-only --staged)" ]]; then
|
||||
git add "$ScriptDir" &> /dev/null
|
||||
git commit -m "update build tools to $Version"
|
||||
else
|
||||
warn "The build tools updated to $Version"
|
||||
warn "This update is not commited because staged files were found in the project folder"
|
||||
fi
|
||||
popd &> /dev/null
|
||||
msg "Successfully updated to $Version" "${GRN}"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user