-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
31 lines (27 loc) · 880 Bytes
/
Copy pathbuild.sh
File metadata and controls
31 lines (27 loc) · 880 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
# What this script do?
# 1. install Cecil if `cecil.phar` is not found (set the `CECIL_VERSION` variable to use a specific version)
# 2. install Composer if `composer.phar` is not found
# 3. install theme(s) if `composer.json` is found
# 4. run `php cecil.phar build -v`
if [ ! -f "./cecil.phar" ]; then
echo "Downloading Cecil"
if [ -z $CECIL_VERSION ]; then
curl -sSOL https://cecil.app/cecil.phar
else
curl -sSOL https://cecil.app/download/$CECIL_VERSION/cecil.phar
fi
fi
php cecil.phar --version
if [ -f "./composer.json" ]; then
echo "Installing theme(s)"
if [ ! -f "./composer.phar" ]; then
curl -sS https://getcomposer.org/installer | php
fi
php composer.phar install --prefer-dist --no-dev --no-progress --no-interaction
fi
php cecil.phar build -v
# build success? can deploy?
if [ $? = 0 ]; then
exit 0
fi
echo "Build fail."; exit 1