-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·28 lines (28 loc) · 1013 Bytes
/
build.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
#!/bin/bash
# DESCRIPTION
# for build JBake project on Netlify
#
# USAGE
# Assume the root directory of your git repository is the root
# directory of your JBake project.
# On Netlify, set `Build Cmd` to `sh build.sh [JBake_version]`,
# then Netlify will build your JBake project with the JBake version
# you specified.
#
# For example, if you want to build the project with JBake v2.4.0,
# just set `sh build.sh 2.4.0` in `Build Cmd`.
#
# If you don't specify the version number, i.e. `sh build.sh`,
# then the latest JBake version is used.
#
if [ $# -eq 0 ]
then # if no argument passed in, set jBake to latest version
jbake_version=2.6.7
else
jbake_version=$1
fi
echo "downloading JBake v$jbake_version"
wget --quiet https://github.com/jbake-org/jbake/releases/download/v$jbake_version/jbake-$jbake_version-bin.zip
echo "unzipping JBake v$jbake_version"
unzip -o -q jbake-$jbake_version-bin.zip
jbake-$jbake_version-bin/bin/jbake -b