Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ Help()
}

# Set variable defaults
ALSO_COMPOSER_UPDATE=""
COMPOSER_UPDATE=""

# Get the options
while getopts ":uh" option; do
case $option in
u)
ALSO_COMPOSER_UPDATE="1";;
COMPOSER_UPDATE="1";;
h) # display Help
Help
exit;;
esac
done

# Export vars for other scripts
export ALSO_COMPOSER_UPDATE=${ALSO_COMPOSER_UPDATE}
export COMPOSER_UPDATE=${COMPOSER_UPDATE}

# includes filenames beginning with a '.' in the results of filename expansion (/*)
shopt -s dotglob
Expand Down
12 changes: 6 additions & 6 deletions sync/04-docker-composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ cp -r "$COMPOSER_WORK_DIR"/vendor "$PWD"/dist
# composer install
COMPOSER_WORK_DIR="$PWD"/dist

echo "Performing composer install with composer-merge plugin"
composer_in_docker install --no-dev --no-progress --optimize-autoloader

# composer update (When ALSO_COMPOSER_UPDATE = 1)
if [ "${ALSO_COMPOSER_UPDATE}" = "1" ]; then
echo "Performing composer update"

# composer update (When COMPOSER_UPDATE = 1)
if [ "${COMPOSER_UPDATE}" = "1" ]; then
echo "Performing composer update with composer-merge plugin"
composer_in_docker update --no-dev --no-progress --optimize-autoloader
cp dist/composer.lock dist-persist/
else
echo "SKIPPING: composer update (As you didn't request it)"
echo "Performing composer install with composer-merge plugin"
composer_in_docker install --no-dev --no-progress --optimize-autoloader
fi;

# Sometimes composer git clones things rather than using zips.
Expand Down
Loading