aboutsummaryrefslogtreecommitdiffstats
path: root/tools/conf/srv/gitolite/deploy-web-doc
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2017-02-01 05:10:24 +0000
committerSilvino Silva <silvino@bk.ru>2017-02-01 05:10:24 +0000
commited23bb3344ec5be2893db8d8d838c38c9f2baacd (patch)
tree662a5e7ce5569249b63c9f4925ba4f75b4c44575 /tools/conf/srv/gitolite/deploy-web-doc
parentaac4d4e7e8de530495e0e0827ddf7680c7e65e69 (diff)
parenta671b0c01821d46d9f783393b887d7987ec10161 (diff)
downloaddoc-ed23bb3344ec5be2893db8d8d838c38c9f2baacd.tar.gz
New release 0.3.0
Diffstat (limited to 'tools/conf/srv/gitolite/deploy-web-doc')
-rwxr-xr-xtools/conf/srv/gitolite/deploy-web-doc42
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/conf/srv/gitolite/deploy-web-doc b/tools/conf/srv/gitolite/deploy-web-doc
new file mode 100755
index 0000000..ae8e2db
--- /dev/null
+++ b/tools/conf/srv/gitolite/deploy-web-doc
@@ -0,0 +1,42 @@
+#!/bin/bash
+######################################################################
+#
+# Put this file in your gitolite-admin;
+# ~/gitolite-admin/local/hooks/repo-specific/deploy-web-doc
+#
+# set host to empty to create package for each push
+# or set remote host to create package based on last deployed push
+# host="https://doc.localhost"
+host=""
+# set name of witch branch should be deployed
+branch_to_deploy="deploy_branch"
+
+######################################################################
+
+
+url="$host/.last_deploy"
+source /srv/gitolite/deploy/hook.sh
+read oldrev newrev refname
+push_branch=$(git rev-parse --symbolic --abbrev-ref $refname)
+
+#SCRIPT_VARS=$(set)
+#echo "project: $PROJECT"
+#echo "local dir: $PWD" &gt; /srv/gitolite/deploy/${GL_REPO}
+#echo "${SCRIPT_VARS}" &gt;&gt; /srv/gitolite/deploy/${GL_REPO}
+
+if [[ $push_branch = $branch_to_deploy ]]; then
+
+ # if host empty we make local tracking
+ if [[ $host = "" ]]; then
+ if [[ $(is_initial ${GL_REPO}) = "true" ]]; then
+ oldrev="initial"
+ fi
+ else
+ if [[ ! $(valid_url $url) = "true" ]]; then
+ echo "Deploy: set $url on remote to start creating packages"
+ exit 1
+ fi
+ oldrev=$(get_remote_rev $url)
+ fi
+ create_package ${GL_REPO} ${PWD} ${oldrev} ${newrev} "deploy-web.sh"
+fi