Skip to content

Commit 49f91ef

Browse files
committed
Add script for jekyll v1 building
1 parent 49ac8bf commit 49f91ef

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

scripts/build-v1.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# This script is meant to be run automatically
5+
# as part of the jekyll-hook application.
6+
# https://github.com/developmentseed/jekyll-hook
7+
8+
repo=$1
9+
branch=$2
10+
owner=$3
11+
giturl=$4
12+
source=$5
13+
build=$6
14+
15+
# Check to see if repo exists. If not, git clone it
16+
if [ ! -d $source ]; then
17+
git clone $giturl $source
18+
fi
19+
20+
# Git checkout appropriate branch, pull latest code
21+
cd $source
22+
git checkout $branch
23+
git pull origin $branch
24+
cd -
25+
26+
# Run jekyll
27+
cd $source
28+
jekyll build --source $source --destination $build
29+
cd -

0 commit comments

Comments
 (0)