blob: 84c8748ab0a93be98c4d1ca7efc2c2235ab24389 [file] [log] [blame]
#!/bin/bash -e
if [[ "$1" != "build" ]]; then
echo "Deploy the mynewt website"
echo "Make sure git status is clean and run from the master branch"
echo "Usage: $0 build"
echo Remove unwanted html templates
find site -name "*.html" | xargs grep '{%.*%}' -l | xargs rm -f
echo Copy extra static pages into site
cp -a extras/* site/
echo Change git branch to asf-site
git checkout asf-site
echo Remove old content
ls | grep -v site | xargs rm -rf
echo Copy contents of site to serving directory
cp -a site/* .
echo ---
echo --- You are now on the asf-site branch
echo --- Review git diffs before committing
echo ---
git status