Add 'deploy-now.sh'
parent
7ce1b099cd
commit
df9565538e
|
@ -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.
|
||||
"
|
Loading…
Reference in New Issue