Last active
March 3, 2021 22:06
-
-
Save ArnaudLigny/6b2aa9e6b25581c96435e9296efe0c0e to your computer and use it in GitHub Desktop.
Cecil build script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# What this script do? | |
# 1. install Cecil if `cecil.phar` is not found (force a specific version with `CECIL_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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment