Skip to content
Snippets Groups Projects
Commit c4a68a0e authored by Ryan Smith's avatar Ryan Smith
Browse files

Updates build script.

parent 20870773
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env sh
# Creates a folder to zip.
rm -f xapi.zip
composer install --no-interaction --no-dev
php -r "readfile('https://getcomposer.org/installer');" | php
php composer.phar install --no-interaction --no-dev
cp -r . ../moodle_logstore_build
# Removes unused files and folders.
find ../moodle_logstore_build -type d -name 'tests' | xargs rm -rf
find ../moodle_logstore_build -type d -name 'docs' | xargs rm -rf
find ../moodle_logstore_build -type d -name '.git' | xargs rm -rf
find ../moodle_logstore_build -type f -name 'composer.*' | xargs rm -rf
find ../moodle_logstore_build -type f -name 'phpunit.*' | xargs rm -rf
find ../moodle_logstore_build -type f -name '*.md' | xargs rm -rf
# Creates the zip file.
mv ../moodle_logstore_build xapi
zip -r xapi.zip xapi -x "xapi/.git/**/*"
rm -rf xapi
# Updates Github.
git add xapi.zip
git commit -m "Builds zip file."
git push
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment