Skip to content

Commit

Permalink
Enhance test-gitignore file and rename to 'prepare-commit.sh'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Nov 20, 2019
1 parent c56d697 commit b7ece14
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tools/test-gitignore.sh → tools/prepare-commit.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Add .gitignore file to empty test directories.
# Prepares a Commit
#
# - Adds .gitignore file to empty test directories.
#
# When Eclipse creates 'test' src folders they are sometimes empty. Empty
# folders are not committed to GIT. Because of this Eclipse would show errors
# when importing the projects. This script creates an empty '.gitignore' file
# inside each 'test' folder to solve this.
#
# See https://stackoverflow.com/questions/115983
#
# When Eclipse creates 'test' src folders they are sometimes empty. Empty
# folders are not committed to GIT. Because of this Eclipse would show errors
# when importing the projects. This script creates an empty '.gitignore' file
# inside each 'test' folder to solve this.
# - Resets .classpath files.
#
# See https://stackoverflow.com/questions/115983
# When Eclipse 'Build All' is called, all .classpath files are touched and
# unnecessarily marked as changed. Using this script those files are reset
# to origin.
#
for D in *; do
if [ -d "${D}" ]; then
Expand Down Expand Up @@ -33,6 +41,9 @@ for D in *; do
echo "${D}/test/.gitignore -> missing"
touch ${D}/test/.gitignore
fi

# restore .classpath file from develop branch
git checkout origin/develop ${D}/.classpath
;;
esac
fi
Expand Down

0 comments on commit b7ece14

Please sign in to comment.