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