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

Merge pull request #148 from xAPI-vle/auto-release

Fixes zip file.
parents 06d9a4af c259a3b3
No related branches found
No related tags found
No related merge requests found
...@@ -7,3 +7,5 @@ ...@@ -7,3 +7,5 @@
/node_modules /node_modules
/package-lock.json /package-lock.json
/vendor /vendor
/xapi
/xapi.zip
#!/usr/bin/env sh #!/usr/bin/env sh
# Creates a folder to zip. # Installs composer production dependencies.
rm -f xapi.zip rm -rf vendor
php -r "readfile('https://getcomposer.org/installer');" | php composer install --no-interaction --no-dev
php composer.phar install --no-interaction --no-dev
cp -r . ../moodle_logstore_build
# Removes unused files and folders. # Creates folder to zip.
find ../moodle_logstore_build -type d -name 'tests' | xargs rm -rf rm -rf xapi
find ../moodle_logstore_build -type d -name 'docs' | xargs rm -rf mkdir -p ./xapi/classes && cp -r ./classes ./xapi
find ../moodle_logstore_build -type d -name '.git' | xargs rm -rf mkdir -p ./xapi/db && cp -r ./db ./xapi
find ../moodle_logstore_build -type f -name '.gitignore' | xargs rm -rf mkdir -p ./xapi/lang && cp -r ./lang ./xapi
find ../moodle_logstore_build -type f -name 'composer.*' | xargs rm -rf mkdir -p ./xapi/lib && cp -r ./lib ./xapi
find ../moodle_logstore_build -type f -name 'phpunit.*' | xargs rm -rf mkdir -p ./xapi/vendor && cp -r ./vendor ./xapi
find ../moodle_logstore_build -type f -name '*.md' | xargs rm -rf cp ./LICENSE ./xapi
find ../moodle_logstore_build -type f -name 'node_modules' | xargs rm -rf cp ./README.md ./xapi
find ../moodle_logstore_build -type f -name 'package-lock.json' | xargs rm -rf cp ./settings.php ./xapi
find ../moodle_logstore_build -type f -name 'package.json' | xargs rm -rf cp ./version.php ./xapi
# Creates the zip file. # Creates the zip file.
mv ../moodle_logstore_build xapi zip -r xapi.zip xapi
zip -r xapi.zip xapi -x "xapi/.git/**/*"
rm -rf xapi
File deleted
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