about summary refs log blame commit diff stats
path: root/js/magic-bird/imgs/extracted-1688-map/MapPartsWhite/hills_white/116.png
blob: 2a48e9b68bed84f4c3e37d9b4dec4eb39a396f76 (plain) (tree)
blob is binary.
'n27' href='#n27'>27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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" > /srv/gitolite/deploy/${GL_REPO}
#echo "${SCRIPT_VARS}" >> /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