git scripts update

This commit is contained in:
sHa
2019-06-07 12:16:30 +03:00
parent ddb3dc0d8e
commit c68d3c0223
4 changed files with 29 additions and 7 deletions

View File

@@ -28,4 +28,12 @@ cd $PROJECT/storage
git add . --all &&
git commit -m "storage"
git push origin master --force
if [ -f $PROJECT/docker/.ssh/id_rsa ]; then
if [ `stat -c %a $PROJECT/docker/.ssh/id_rsa` -ne '600' ]; then
chmod -R a=rwX,go-rwX $PROJECT/docker/.ssh
fi
ssh-agent sh -c "ssh-add -D; ssh-add $PROJECT/docker/.ssh/id_rsa; git push origin master --force"
else
git push origin master --force
fi