Files
nginx-php-fpm/scripts/push
2016-07-12 12:53:40 +01:00

22 lines
385 B
Bash
Executable File

#!/bin/bash
timestamp() {
date +"%D %T"
}
if [ -z "$GIT_EMAIL" ]; then
echo "You need to pass the \$GIT_EMAIL variable to the container for this to work"
exit
fi
if [ -z "$GIT_NAME" ]; then
echo "You need to pass the \$GIT_NAME variable to the container for this to work"
exit
fi
ts=$(timestamp)
cd /var/www/html
git add .
git commit -a -m "push from container $ts"
git push