taler-deployment

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

update_taler-ops.sh (1259B)


      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/taler-ops-www
     15 
     16 # Prod = stable (same as www.taler.net / update_taler.sh); stage = master.
     17 git checkout stable -f
     18 fetch
     19 git submodule update --init --force
     20 ./bootstrap
     21 ./configure --baseurl="https://taler-ops.ch/" --prefix=$HOME/www.taler-ops.ch.wip
     22 make build-site
     23 make parcel &> /dev/null || true # segfaults on server, not sure why
     24 make parcel # 2nd run works...
     25 make install-files
     26 
     27 chmod -R g+rx $HOME/www.taler-ops.ch.wip/
     28 
     29 # Clean up 'ancient' version (before previous)
     30 rm -rf $HOME/www.taler-ops.ch.old/
     31 # Finally, do two fast renames to make the current version active
     32 mv $HOME/www.taler-ops.ch/ $HOME/www.taler-ops.ch.old/ || true
     33 mv $HOME/www.taler-ops.ch.wip/ $HOME/www.taler-ops.ch/
     34 
     35 cd
     36 
     37 # #11270: DNS A still pixel until cutover; prod rsync must hit chayote box.
     38 # firefly known_hosts must pin chayote.box.taler-systems.com ed25519.
     39 rsync -av --rsh="ssh -o HostName=chayote.box.taler-systems.com" www.taler-ops.ch www@taler-ops.ch:.