Junk

Junk Commit Details

Date:2015-11-18 16:07:44 (3 years 8 months ago)
Author:Nicola Fontana
Branch:master
Commit:9a196dd42ba50d4066df38430621caca5eec6f73
Parents: c6889901786e2d7832a9f903249b5d2529ebb4e8
Message:gitdeploy: improve documentation

Changes:
Mgit/gitdeploy (3 diffs)

File differences

git/gitdeploy
11
22
33
4
4
55
6
7
8
9
6
7
8
9
1010
1111
1212
......
2222
2323
2424
25
25
2626
2727
2828
2929
30
30
3131
32
33
32
33
3434
3535
3636
......
106106
107107
108108
109
109
110110
111111
112112
# This script is expected to be sourced from git hooks.
#
# USAGE:
# source gitdeploy WEBDIR [FRONTEND]
# source gitdeploy WEBDIR [FRAMEWORK]
#
# where WEBDIR is the (usually absolute) directory where the public
# website is contained. FRONTEND specifies the web framework to know
# how the data must be handled. If not specified, FRONTEND falls
# back to "dummy" (that is no-op).
# where WEBDIR is the (usually absolute) path to where the website
# must be deployed. FRAMEWORK specifies the web framework used for
# generating the database dumps. If not specified, no attempts to
# back up the database will be made.
#
# EXAMPLE:
# In the remote repository, create two hooks:
# remote2public
error() {
die() {
echo "** $@" 1>&2
}
[ -z "$1" ] && error 'gitdeploy requires a WEBDIR as first argument' && exit 1
[ -z "$1" ] && die 'gitdeploy requires a WEBDIR as first argument' && exit 1
webdir="$1"
frontend="$2"
[ -z "$frontend" ] && frontend=dummy
framework="$2"
[ -z "$framework" ] && framework=dummy
# Ovveride git to explicitely set its working directory to $webdir.
subdomain="$(basename $dir)"
echo -n "Refreshing subdomain $subdomain... "
if refresh_$frontend "$dir" "$webdir/$subdomain.data"; then
if refresh_$framework "$dir" "$webdir/$subdomain.data"; then
echo done
else
echo not a subdomain

Archive Download the corresponding diff file

Branches