Commit 5cffcf1c authored by Fabien Potencier's avatar Fabien Potencier

removed the build script

parent f9eadbcd
#!/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
for TYPE in slim fat
do
if [ -d "$DIR/build/skeleton" ]; then
rm -rf $DIR/build/skeleton
fi
mkdir -p $DIR/build/skeleton
cd "$DIR/build/skeleton"
mkdir -p web/
COMPOSER=$TYPE"_composer.json"
cp $DIR/bin/skeleton/$COMPOSER composer.json
cp $DIR/bin/skeleton/index.php web/index.php
$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 test* | xargs rm -rf -
find . -type d -name doc | xargs rm -rf -
find . -type d -name ext | xargs rm -rf -
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
cd "$DIR/build/tmp"
if [ "slim" = "$TYPE" ]; then
NAME="silex"
else
NAME="silex_fat"
fi
rm -f "$DIR/build/$NAME.*"
tar zcpf "$DIR/build/$NAME.tgz" silex
zip -rq "$DIR/build/$NAME.zip" silex
rm -rf "$DIR/build/tmp"
rm -rf "$DIR/build/skeleton"
done
{
"require": {
"silex/silex": "~1.1",
"symfony/browser-kit": "~2.3",
"symfony/console": "~2.3",
"symfony/config": "~2.3",
"symfony/css-selector": "~2.3",
"symfony/dom-crawler": "~2.3",
"symfony/filesystem": "~2.3",
"symfony/finder": "~2.3",
"symfony/form": "~2.3",
"symfony/locale": "~2.3",
"symfony/process": "~2.3",
"symfony/security": "~2.3",
"symfony/serializer": "~2.3",
"symfony/translation": "~2.3",
"symfony/validator": "~2.3",
"symfony/monolog-bridge": "~2.3",
"symfony/twig-bridge": "~2.3",
"doctrine/dbal": ">=2.2.0,<2.4.0-dev",
"swiftmailer/swiftmailer": "5.*"
}
}
<?php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->get('/hello', function () {
return 'Hello!';
});
$app->run();
{
"require": {
"silex/silex": "~1.1"
}
}
......@@ -4,17 +4,11 @@ Usage
Installation
------------
If you want to get started fast, `download`_ Silex as an archive and extract
it, you should have the following directory structure:
If you want to get started fast, use the `Silex Skeleton`_:
.. code-block:: text
.. code-block:: bash
├── composer.json
├── composer.lock
├── vendor
│ └── ...
└── web
└── index.php
composer create-project fabpot/silex-skeleton path/to/install "~2.0"
If you want more flexibility, use Composer_ instead:
......@@ -797,7 +791,7 @@ Cross-Site-Scripting attacks.
return $app->json(array('name' => $name));
});
.. _download: http://silex.sensiolabs.org/download
.. _Silex Skeleton: http://github.com/silexphp/Silex-Skeleton
.. _Composer: http://getcomposer.org/
.. _Request: http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html
.. _Response: http://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html
......
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