taler-deployment

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

update_anastasis.sh (872B)


      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-www
     15 
     16 git checkout master -f
     17 fetch
     18 git submodule update --init --force
     19 ./bootstrap
     20 ./configure --baseurl="https://anastasis.lu/" --prefix=$HOME/www.anastasis.lu.wip
     21 make install
     22 
     23 chmod -R g+rx $HOME/www.anastasis.lu.wip/
     24 
     25 # Clean up 'ancient' version (before previous)
     26 rm -rf $HOME/www.anastasis.lu.old/
     27 # Finally, do two fast renames to make the current version active
     28 mv $HOME/www.anastasis.lu/ $HOME/www.anastasis.lu.old/ || true
     29 mv $HOME/www.anastasis.lu.wip/ $HOME/www.anastasis.lu/
     30 
     31 cd
     32 
     33 rsync -av --rsh=ssh www.anastasis.lu www@anastasis.lu:.