Skip to content

Commit

Permalink
Clean unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
sescandell committed Jun 28, 2014
1 parent db5602c commit 328e621
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 192 deletions.
46 changes: 0 additions & 46 deletions Deployment/Composer/DeploymentListener.php

This file was deleted.

53 changes: 0 additions & 53 deletions Deployment/WebsitesFileCopyTask.php

This file was deleted.

File renamed without changes.
53 changes: 32 additions & 21 deletions Resources/private/websites/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ echo Validating prerequisites
hash node 2>/dev/null
exitWithMessageOnError "Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment."

# Check composer is there
if [ ! -f composer.phar ];
then
echo "Downloading Composer"
curl -sS https://getcomposer.org/installer | php -- --quiet
exitWithMessageOnError "Composer download failed"
else
echo "Updating Composer"
php composer.phar self-update
exitWithMessageOnError "Composer self-update failed"
fi

# Setup
# -----
echo Setup env variables
Expand Down Expand Up @@ -85,16 +73,39 @@ fi
# ----------
echo Initializing PHP

export PHP_INI_SCAN_DIR=$DEPLOYMENT_SOURCE/app/website/php
export PHP_BASE_CUSTOM_EXTENSIONS_DIR=$DEPLOYMENT_SOURCE/app/website/php/ext
export PHP_INI_SCAN_DIR=$DEPLOYMENT_SOURCE/app/websites/php
export PHP_BASE_CUSTOM_EXTENSIONS_DIR=$DEPLOYMENT_SOURCE/app/websites/php/ext

echo Initializing Symfony project
export SYMFONY_ENV=prod
export SYMFONY_ENV=azure

cd "$DEPLOYMENT_SOURCE"
# Invoke Composer, but without the scripts section because subprocesses don't have the correct user and permissions
php composer.phar install --prefer-dist -v --optimize-autoloader --no-dev --no-interaction
exitWithMessageOnError "Composer install failed"
# Run composer install only if there is a difference between the new composer.lock and the previous one
diff composer.lock "$DEPLOYMENT_TARGET/composer.lock"

if [ ! $? -eq 0 ]; then
# Check composer is there
if [ ! -f composer.phar ];
then
echo "Downloading Composer"
curl -sS https://getcomposer.org/installer | php -- --quiet
exitWithMessageOnError "Composer download failed"
else
echo "Updating Composer"
php composer.phar self-update
exitWithMessageOnError "Composer self-update failed"
fi

php composer.phar install --prefer-dist -v --no-interaction --optimize-autoloader
exitWithMessageOnError "Composer install failed"
else
echo No need to run composer install
php app/console cache:clear

php app/console assets:install web
fi

php app/console assetic:dump

# 1. KuduSync
if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then
Expand All @@ -114,7 +125,7 @@ if [[ -n "$POST_DEPLOYMENT_ACTION" ]]; then
exitWithMessageOnError "post deployment action failed"
fi

echo "Clearing Production cache by deleting $TEMP/cache/prod"
rm -Rf "$TEMP/cache/prod"
echo "Clearing Production cache by deleting $TEMP/cache/azure"
rm -Rf "$TEMP/cache/azure"

echo "Finished successfully."
echo "Finished successfully."
48 changes: 0 additions & 48 deletions Tests/Deployment/ComposerDeploymentListenerTest.php

This file was deleted.

58 changes: 34 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
{
"name": "brainsonic/azure-distribution-bundle",
"description": "Integration of Windows Azure SDK and workflows into Symfony applications.",
"license": "MIT",
"type": "symfony-bundle",
"authors": [
{"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
{"name": "Stéphane Escandell", "email": "stephane.escandell@gmail.com"}
],
"require": {
"symfony/symfony": "~2.3",
"microsoft/windowsazure": "0.4.*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
"autoload": {
"psr-0": { "WindowsAzure\\DistributionBundle":"" }
},
"target-dir": "WindowsAzure/DistributionBundle"
}

"name" : "brainsonic/azure-distribution-bundle",
"description" : "Integration of Windows Azure SDK and workflows into Symfony applications.",
"license" : "MIT",
"type" : "symfony-bundle",
"authors" : [{
"name" : "Benjamin Eberlei",
"email" : "kontakt@beberlei.de"
}, {
"name" : "Stéphane Escandell",
"email" : "stephane.escandell@gmail.com"
}
],
"require" : {
"symfony/symfony" : "~2.3",
"microsoft/windowsazure" : "dev-dev@dev",
"pear-pear.php.net/http_request2" : "*",
"pear-pear.php.net/mail_mime" : "*",
"pear-pear.php.net/mail_mimedecode" : "*"
},
"require-dev": {
"phpunit/phpunit": "4.1.*"
},
"repositories" : [{
"type" : "pear",
"url" : "http://pear.php.net"
}
],
"autoload" : {
"psr-0" : {
"WindowsAzure\\DistributionBundle" : ""
}
},
"target-dir" : "WindowsAzure/DistributionBundle"
}

0 comments on commit 328e621

Please sign in to comment.