* Add remove option

* [auto] Update compiled version

* Add fixes

* [auto] Update compiled version

* Update docs
This commit is contained in:
Federico Grandi
2020-02-21 16:48:19 +01:00
committed by GitHub
parent a2b49385e8
commit de8a121ebd
5 changed files with 27 additions and 23 deletions

View File

@@ -21,13 +21,18 @@ EOF
}
add() {
if $INPUT_FORCE; then f=-f; fi
if $INPUT_FORCE; then f=-f; else f=; fi
find $INPUT_PATH -name "$INPUT_PATTERN" | while read x; do git add $f $x; done
}
remove() {
if [ -n "$INPUT_REMOVE" ]; then git rm $INPUT_REMOVE; fi
}
# This is needed to make the check work for untracked files
echo "Staging files in commit path..."
echo "Staging files..."
add
remove
echo "Checking for uncommitted changes in the git working tree..."
# This section only runs if there have been file changes
@@ -49,9 +54,15 @@ if ! git diff --cached --exit-code; then
echo "Pulling from remote..."
git fetch && git pull
echo "Resetting files..."
git reset
echo "Adding files..."
add
echo "Removing files..."
remove
echo "Creating commit..."
git commit -m "$INPUT_MESSAGE" --author="$INPUT_AUTHOR_NAME <$INPUT_AUTHOR_EMAIL>"