forked from apache/mynewt-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·30 lines (23 loc) · 660 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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
echo "Usage: $0 build"
exit
fi
echo Remove unwanted html templates
find site -name "*.html" | xargs grep '{%.*%}' -l | xargs rm
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