on patch-1 help sign in
25 lines 614 B history raw
1# Env variables and functions for updating git repos
3export GIT_COMMITTER_NAME="IOHK"
4export GIT_COMMITTER_EMAIL="devops+nix-tools@iohk.io"
5export GIT_AUTHOR_NAME="$GIT_COMMITTER_NAME"
6export GIT_AUTHOR_EMAIL="$GIT_COMMITTER_EMAIL"
8use_ssh_key() {
9 sshkey=$1
10 if [ -e $sshkey ]
11 then
12 echo "Authenticating using SSH with $sshkey"
13 export GIT_SSH_COMMAND="ssh -i $sshkey -F /dev/null"
14 else
15 echo "There is no SSH key at $sshkey"
16 echo "Git push may not work."
17 fi
20check_staged() {
21 if git diff-index --cached --quiet HEAD --; then
22 echo "No changes to commit, exiting."
23 exit 0
24 fi