diff options
author | Silvino Silva <silvino@bk.ru> | 2016-10-26 19:45:54 +0100 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2016-10-26 20:54:21 +0100 |
commit | 5509a84e0d1a2732a429120e0bd26b83e119481f (patch) | |
tree | 25a11a08a96f361b91dd8f01425951d67ac93a1e | |
parent | e531438cca8a8c1a5c7ccc87cbd1abfcd3fd7fcf (diff) | |
download | doc-5509a84e0d1a2732a429120e0bd26b83e119481f.tar.gz |
fix tools gitolite hook deployweb
-rwxr-xr-x | tools/conf/srv/gitolite/deployweb | 6 | ||||
-rwxr-xr-x | tools/conf/srv/gitolite/hook-deployweb | 5 | ||||
-rw-r--r-- | tools/gitolite.html | 8 |
3 files changed, 9 insertions, 10 deletions
diff --git a/tools/conf/srv/gitolite/deployweb b/tools/conf/srv/gitolite/deployweb index ca4dce8..5a18ed1 100755 --- a/tools/conf/srv/gitolite/deployweb +++ b/tools/conf/srv/gitolite/deployweb @@ -3,11 +3,11 @@ ###################################################################### # # Put this file in; -# /usr/share/gitolite/hooks/deployweb +# /usr/share/gitolite/deployweb # DIR_WWW=/srv/www/ -DEPLOY_BRANCH=master -TARGET_USER=www +DEPLOY_BRANCH=deployweb +TARGET_USER=nginx for DP_FILE in /srv/gitolite/deploy/* do diff --git a/tools/conf/srv/gitolite/hook-deployweb b/tools/conf/srv/gitolite/hook-deployweb index a311c00..1a32bd9 100755 --- a/tools/conf/srv/gitolite/hook-deployweb +++ b/tools/conf/srv/gitolite/hook-deployweb @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ###################################################################### # @@ -10,7 +10,7 @@ do BRANCH=$(git rev-parse --symbolic --abbrev-ref $refname) echo "Commit was for branch $BRANCH" - if [[ "$BRANCH" == "master" ]];then + if [ "$BRANCH" = "deployweb" ]; then # Get project name from current directory (without .git) PROJECT=$(basename "$PWD") @@ -19,5 +19,4 @@ do echo "Project $PROJECT added to deploy list." echo $PWD > /srv/gitolite/deploy/$PROJECT fi - done diff --git a/tools/gitolite.html b/tools/gitolite.html index ed511ee..8083ca0 100644 --- a/tools/gitolite.html +++ b/tools/gitolite.html @@ -315,7 +315,7 @@ /srv/gitolite/deploy folder for projects that have been updated.</p> - <p>Create <a href="conf/srv/gitolite/deployweb">/usr/share/gitolite/hooks/deployweb</a>;</p> + <p>Create <a href="conf/srv/gitolite/deployweb">/usr/share/gitolite/deployweb</a>;</p> <pre> #!/bin/sh @@ -323,7 +323,7 @@ ###################################################################### # # Put this file in; - # /usr/share/gitolite/hooks/deployweb + # /usr/share/gitolite/deployweb # DIR_WWW=/srv/www/ DEPLOY_BRANCH=master @@ -406,9 +406,9 @@ # # this way it will log - # * * * * * /usr/share/gitolite/hooks/deployweb + # * * * * * /usr/share/gitolite/deployweb # without log - * * * * * /usr/share/gitolite/hooks/deployweb > /dev/null 2>&1 + * * * * * /usr/share/gitolite/deployweb > /dev/null 2>&1 @hourly ID=sys.hourly /usr/sbin/runjobs /etc/cron/hourly @daily ID=sys.daily /usr/sbin/runjobs /etc/cron/daily |