~ubuntu-branches/ubuntu/wily/pyzmq/wily

« back to all changes in this revision

Viewing changes to docs/update_ghpages.sh

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-02-24 19:23:15 UTC
  • mfrom: (1.2.1) (9 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20130224192315-qhmwp3m3ymk8r60d
Tags: 2.2.0.1-1
* New upstream release
* relicense debian packaging to LGPL-3
* update watch file to use github directly
  thanks to Bart Martens for the file
* add autopkgtests
* drop obsolete DM-Upload-Allowed
* bump standard to 3.9.4, no changes required

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env sh
 
2
# pick repo for gh-pages branch
 
3
repo=origin
 
4
 
 
5
if [ ! -d gh-pages ]; then
 
6
    echo "setting up gh-pages subdir"
 
7
    mkdir gh-pages || exit -1
 
8
    cp -r ../.git gh-pages/ || exit -1
 
9
    cd gh-pages || exit -1
 
10
    init=0
 
11
    git checkout $repo/gh-pages || init=1
 
12
    if [ "$init" != "0" ]; then
 
13
        echo "initializing gh-pages repo"
 
14
        git symbolic-ref HEAD refs/heads/gh-pages || exit -1
 
15
        rm .git/index || exit -1
 
16
        git clean -fdx || exit -1
 
17
        touch index.html
 
18
        git add .
 
19
        git commit -a -m 'init gh-pages' || exit -1
 
20
        git push origin HEAD:gh-pages
 
21
    fi
 
22
    cd ..
 
23
fi
 
24
echo "updating local gh-pages with html build"
 
25
rsync -va build/html/ gh-pages/ --delete --exclude .git --exclude .nojekyll || exit -1
 
26
cd gh-pages
 
27
touch .nojekyll
 
28
git add .nojekyll
 
29
git add .
 
30
git commit -a || exit -1
 
31
echo "pushing to remote gh-pages"
 
32
# pwd
 
33
git push $repo HEAD:gh-pages