Commit 76f82f20 authored by Fabien Potencier's avatar Fabien Potencier

added the script to build the zip/tgz

parent 281a3c1e
phpunit.xml /phpunit.xml
silex.phar /vendor
vendor /build
#!/bin/sh
PHP=`which php`
GIT=`which git`
DIR=`$PHP -r "echo dirname(dirname(realpath('$0')));"`
if [ ! -d "$DIR/build" ]; then
mkdir -p $DIR/build
fi
cd $DIR/build
if [ ! -f "composer.phar" ]; then
curl -s http://getcomposer.org/installer 2>/dev/null | $PHP >/dev/null 2>/dev/null
else
$PHP composer.phar self-update >/dev/null 2>/dev/null
fi
if [ ! -d "$DIR/build/skeleton" ]; then
mkdir -p $DIR/build/skeleton
fi
cd "$DIR/build/skeleton"
cat - << EOF >composer.json
{
"require": {
"silex/silex": "dev-master"
}
}
EOF
mkdir -p web/
cat - << EOF >web/index.php
<?php
require_once __DIR__.'/../vendor/autoload.php';
\$app = new Silex\\Application();
\$app->get('/hello', function() {
return 'Hello!';
});
\$app->run();
EOF
$PHP ../composer.phar install -q
if [ -d "$DIR/build/tmp/silex" ]; then
rm -rf $DIR/build/tmp/silex
fi
mkdir -p $DIR/build/tmp/silex
cd "$DIR/build/tmp/silex"
cp -r ../../skeleton/* .
find . -name .DS_Store | xargs rm -rf -
find . -name .git | xargs rm -rf -
find . -name phpunit.xml.* | xargs rm -rf -
find . -type d -name Tests | xargs rm -rf -
find . -type d -name tests | xargs rm -rf -
find . -type d -name doc | xargs rm -rf -
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
cd "$DIR/build/tmp"
tar zcpf "$DIR/build/silex.tgz" silex
rm -f "$DIR/build/silex.zip"
zip -rq "$DIR/build/silex.zip" silex
rm -rf "$DIR/build/tmp"
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
require_once __DIR__.'/vendor/autoload.php'; require_once __DIR__.'/../vendor/autoload.php';
use Silex\Compiler\Util; use Silex\Compiler\Util;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment