Skip to content

Commit

Permalink
git-tools: handle no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Jan 12, 2024
1 parent 1c71308 commit 6406334
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/git-tools/scripts/git-valu-commit-changes
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ fi
dir="${1}"

if [ ! -d "${dir}" ]; then
echo "Error: ${dir} is not a directory."
>&2 echo "Error: ${dir} is not a directory."
exit 1
fi


git-valu-show-changes "$dir"

if [ "$(git status --porcelain "$dir"")" = "" ]; then
>&2 echo "No changes build change. Skipping commit."
exit 0
fi
# Ensure not other files are added
git reset HEAD
Expand Down

0 comments on commit 6406334

Please sign in to comment.