forked from ionic-team/ionic-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepare.sh
More file actions
executable file
·41 lines (33 loc) · 745 Bytes
/
prepare.sh
File metadata and controls
executable file
·41 lines (33 loc) · 745 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
ARG_DEFS=(
# "--index=(.*)"
# "--total=(.*)"
)
function clone_site {
PROD_DIR="_site"
if [ ! -d "$PROD_DIR" ]; then
echo "Cloning ionic-site in _site"
mkdir $PROD_DIR
cd $PROD_DIR
git config --global user.email "[email protected]"
git config --global user.name "ionitron"
git clone --depth 1 --branch=production [email protected]:driftyco/ionic-site.git .
cd ..
else
echo "using existing"
cd $PROD_DIR
git fetch origin production
git reset --hard
git clean -df
git pull origin production
fi
}
function buildforjekyll {
echo "Building site with jekyll"
#jekyll build --incremental
jekyll build
}
if [ -d "scripts" ]; then
clone_site
buildforjekyll
fi