taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

update_anastasis_docs.sh (774B)


      1 #!/bin/sh
      2 
      3 set -eu
      4 
      5 fetch () {
      6   git clean -fdx
      7   git fetch
      8   # reset to updated upstream branch, but only if we're tracking a branch
      9   branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD)
     10   git reset --hard "$branch"
     11 }
     12 
     13 # Assumes the repo was already checked out once.
     14 cd $HOME/anastasis
     15 
     16 git checkout master -f
     17 fetch
     18 git submodule update --init --force
     19 cd doc/sphinx
     20 make html
     21 mv _build/html/ $HOME/docs.anastasis.lu.wip
     22 
     23 chmod -R g+rx $HOME/docs.anastasis.lu.wip/
     24 
     25 # Clean up 'ancient' version (before previous)
     26 rm -rf $HOME/docs.anastasis.lu.old/
     27 # Finally, do two fast renames to make the current version active
     28 mv $HOME/docs.anastasis.lu/ $HOME/docs.anastasis.lu.old/ || true
     29 mv $HOME/docs.anastasis.lu.wip/ $HOME/docs.anastasis.lu/