I'm trying to set up a file that list all of the files in a project that was modified.
I want this to be done automatically whenever I commit. I tried playing around with all of the git log
commands but still no luck.
I'm doing this to signal to the server which files need re-minification after the server does a checkout on the repo.
EDIT: This is my script so far:
FILES="$(find /home/qwertymk/public_html -type f -name '*.js')"
CHANGED="git whatchanged -n 1 --pretty=format:"
for f in $FILES
do
if [[ $f =~ /home/torah/public_html/ignore-folder/ ]]; then continue; fi
if [[ $f =~ $CHANGED ]]; then continue; fi # What do I do here?
echo "processing - $f"
php /home/qwertymk/jsmin/curl.php $f
done