#!/bin/sh
# Push to Git, publish site and clean up


# Get version number from package.json, need this for tagging.
version=$(node -e "console.log(JSON.parse(require('fs').readFileSync('package.json')).version)")

# Push master to Github, tag current version
git push
#git tag v${version}
#git push --tags origin master

# Keep this until 2.0 is the stable release
npm tag zombie@1.4.1 latest

# Update Web site
$(dirname $0)/docs
echo "Uploading documentation ..."
rsync -chr --del --stats doc/new/ labnotes.org:/var/www/zombie/new

# Clean after ourselves
npm run postpublish
