Created
February 23, 2017 00:41
-
-
Save adampiotrowski/2300cf0b6b953cb0897f753254d9eb66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| action=$1 | |
| components=("Breadcrumb" "Collections" "DataGrid" "DataSet" "DoctrineEnhancer" "Form" "Layout" "Search" "Serializer") | |
| bundles=("ApiBundle" "AppBundle" "CatalogBundle" "CmsBundle" "CoreBundle" "CouponBundle" "GeneratorBundle" "OAuthBundle" "OrderBundle" "ReviewBundle" "RoutingBundle" "SearchBundle" "ShowcaseBundle" "WishlistBundle") | |
| if [ "$action" == 'test' ] | |
| then | |
| for i in "${components[@]}" | |
| do | |
| echo $i | |
| done | |
| fi | |
| if [ "$action" == 'init' ] | |
| then | |
| rm -rf src/WellCommerce/Bundle/* | |
| rm -rf src/WellCommerce/Component/* | |
| git commit -a -m "Commiting changes before initializing subtrees" | |
| for i in "${components[@]}" | |
| do | |
| git subtree add --prefix=src/WellCommerce/Component/$i git@github.com:WellCommerce/$i.git master | |
| done | |
| for i in "${bundles[@]}" | |
| do | |
| git subtree add --prefix=src/WellCommerce/Bundle/$i git@github.com:WellCommerce/$i.git master | |
| done | |
| fi | |
| if [ "$action" == 'push' ] | |
| then | |
| for i in "${components[@]}" | |
| do | |
| git subtree push --prefix=src/WellCommerce/Component/$i git@github.com:WellCommerce/$i.git master | |
| done | |
| for i in "${bundles[@]}" | |
| do | |
| git subtree push --prefix=src/WellCommerce/Bundle/$i git@github.com:WellCommerce/$i.git master | |
| done | |
| fi | |
| if [ "$action" == 'pull' ] | |
| then | |
| for i in "${components[@]}" | |
| do | |
| git subtree pull --prefix=src/WellCommerce/Component/$i git@github.com:WellCommerce/$i.git master | |
| done | |
| for i in "${bundles[@]}" | |
| do | |
| git subtree pull --prefix=src/WellCommerce/Bundle/$i git@github.com:WellCommerce/$i.git master | |
| done | |
| fi | |
| if [ "$action" == 'compose' ] | |
| then | |
| php -d memory_limit=4096M composer.phar update | |
| php composer.phar dump-autoload | |
| rm -rf app/cache/* | |
| app/console assets:install --symlink --relative | |
| app/console doctrine:schema:update --force | |
| gulp | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment