Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 8f3f2d7

Browse files
author
Tobias Kündig
committed
Use which to get git executable
1 parent 4a809d1 commit 8f3f2d7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

templates/git.cron.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env bash
22
HOSTNAME=$( hostname )
3+
GIT=$( which git )
34

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

0 commit comments

Comments
 (0)