Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Merge branch '2.3'
Browse files Browse the repository at this point in the history
* 2.3:
  fixed CS
  Readded Doctrine binaries in the ZIP file and fixed them for the TGZ file
  prepareDeploymentTarget script handler

Conflicts:
	Composer/ScriptHandler.php
  • Loading branch information
fabpot committed Feb 27, 2015
2 parents 4a9d4e5 + ca7ddf6 commit d676445
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
23 changes: 23 additions & 0 deletions Composer/ScriptHandler.php
Expand Up @@ -93,6 +93,29 @@ protected static function hasDirectory(CommandEvent $event, $configName, $path,
return true;
}

/**
* Sets up deployment target specific features.
* Could be custom web server configs, boot command files etc.
*
* @param $event CommandEvent An instance
*/
public static function prepareDeploymentTarget(CommandEvent $event)
{
self::prepareDeploymentTargetHeroku($event);
}

protected static function prepareDeploymentTargetHeroku(CommandEvent $event)
{
$options = self::getOptions($event);
if (($stack = getenv('STACK')) && ($stack == 'cedar' || $stack == 'cedar-14')) {
$fs = new Filesystem();
if (!$fs->exists('Procfile')) {
$event->getIO()->write('Heroku deploy detected; creating default Procfile for "web" dyno');
$fs->dumpFile('Procfile', sprintf('web: $(composer config bin-dir)/heroku-php-apache2 %s/', $options['symfony-web-dir']));
}
}
}

/**
* Clears the Symfony cache.
*
Expand Down
5 changes: 3 additions & 2 deletions Resources/bin/build.sh
Expand Up @@ -60,8 +60,8 @@ cd /tmp/Symfony
TARGET=/tmp/Symfony/vendor

# Doctrine
cd $TARGET/doctrine/orm && rm -rf UPGRADE* build* bin tests tools lib/vendor
cd $TARGET/doctrine/dbal && rm -rf bin build* tests lib/vendor
cd $TARGET/doctrine/orm && rm -rf UPGRADE* build* tests tools lib/vendor
cd $TARGET/doctrine/dbal && rm -rf build* tests lib/vendor
cd $TARGET/doctrine/common && rm -rf build* tests lib/vendor
if [ -d $TARGET/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle ]; then
cd $TARGET/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle && rm -rf Tests Resources/doc
Expand Down Expand Up @@ -114,6 +114,7 @@ find $TARGET -name .gitignore | xargs rm -rf -
find $TARGET -name .gitmodules | xargs rm -rf -
find $TARGET -name .svn | xargs rm -rf -

# With vendors
cd /tmp
tar zcpf $DIR/Symfony_Standard_Vendors_$VERSION.tgz Symfony
sudo rm -f $DIR/Symfony_Standard_Vendors_$VERSION.zip
Expand Down

0 comments on commit d676445

Please sign in to comment.