Add 'deploy-now.sh'

master
Jan Danielzick 2021-08-27 02:37:16 +02:00
parent 7ce1b099cd
commit df9565538e
1 changed files with 30 additions and 0 deletions

30
deploy-now.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
REPOSITORY_NAME=$1
REPOSITORY_SSH_URL=$2
echo -n "
deploy-now: Deploying now...
Current time: `date`
Repository: "
echo $REPOSITORY_NAME
echo $REPOSITORY_SSH_URL
echo -n "
"
echo -n "
On `date`
Repository: " >&2
echo $REPOSITORY_NAME >&2
echo $REPOSITORY_SSH_URL >&2
echo -n "
" >&2
cd /var/www/git
rm -rvf $REPOSITORY_NAME
git clone $REPOSITORY_SSH_URL
cd /var/www/git/$REPOSITORY_NAME
chmod -v +x ./deployment-script.sh
./deployment-script.sh
echo -n "
deploy-now: Done.
"