Skip to content

Commit

Permalink
Use which to get git executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kündig committed May 2, 2016
1 parent 4a809d1 commit 8f3f2d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions templates/git.cron.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
HOSTNAME=$( hostname )
GIT=$( which git )

# Commit changes from prod server back to git
if [[ -n $(git status -s) ]]; then
git add .
git commit -m "[ci skip] Added changes from $HOSTNAME"
git push origin master
$GIT add .
$GIT commit -m "[ci skip] Added changes from $HOSTNAME"
$GIT push origin master
fi

0 comments on commit 8f3f2d7

Please sign in to comment.