hieunguyen
10/13/2019 - 8:10 AM

Mobelaris upload manaully script

Live site upload

#!/bin/bash

array=(
#vendor/magento/module-sales/Model/AdminOrder/Create.php
#vendor/magento/module-catalog/Block/Product/AbstractProduct.php # enable cache of category page
# "vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php" // fixing sorting by entity_id issue on category view page
#app/code/Mobelaris/Sales/Block/Adminhtml/Item/Grid.php
#app/code/Mobelaris/Catalog/Model/Attribute/Backend/ShoppingFeedItemId.php
#app/code/Mobelaris/Catalog/Console/GoogleFeedItemId.php
#app/code/Mobelaris/Catalog/Console/GoogleFeedItemId.php
#vendor/magento/framework/DataObject.php
#app/code/Mirasvit/Search/Plugin/NoRoutePlugin.php
#vendor/magento/framework/App/PageCache/Kernel.php
#vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php
#vendor/magento/framework/App/PageCache/Identifier.php
#app/code/Cloudinary/Cloudinary/Ui/DataProvider/Product/Form/Modifier/Product.php
#app/code/Mobelaris/ShippingChanges/Model/ShippingRate/FR.php
#app/code/Mobelaris/ShippingChanges/Model/ShippingRate/FI.php
#vendor/magento/module-backend/Block/System/Store/Edit/Form/Store.php
#app/code/Mobelaris/Store/Observer/SaveProductAfter.php
#app/code/MageWorx/StoreSwitcher/Model/Switcher.php
#app/code/MageWorx/StoreSwitcher/Model/Observer/Autoswitcher.php
#app/code/MageWorx/StoreSwitcher/Model/Switcher.php
#app/code/Mobelaris/Price/Api/PriceUpdateHandler.php
#app/code/Mobelaris/Store/Observer/SaveProductAfter.php
#app/code/Mobelaris/Price/Api/PriceUpdateHandler.php
#app/code/Mobelaris/ShippingChanges/Model/ShippingRate/DefaultRate.php
#app/code/Mirasvit/SearchAutocomplete/Plugin/TemplatePlugin.php
app/code/Hieu/ImageAlt/Plugin/View/Element/TemplatePlugin.php
#app/code/MageWorx/StoreSwitcher/Model/Observer/Autoswitcher.php
#vendor/magento/module-indexer/Block/Backend/Grid/Column/Renderer/Scheduled.php
#app/code/Cloudinary/Cloudinary/Model/ImageRepository.php // include product image to exlcude when sync to cloudinary
#vendor/oyejorge/
#vendor/pelago/emogrifier/
#vendor/magento/framework/Session/SessionManager.php
#vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php
#app/code/Mobelaris/General/Plugin/App/PageCache/KernelPlugin.php
#app/code/Mobelaris/CountrySelection/Plugin/App/PageCache/KernelPlugin.php
#app/code/Mobelaris/CountrySelection/etc/frontend/di.xml
#app/etc/env.php
#vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php
#app/code/Nwdthemes/Revslider/Block/Revslider.php
#vendor/magento/module-catalog/Model/ResourceModel/Product.php


)

echo "Array size: ${#array[*]}"

echo "Array items and indexes:"
for index in ${!array[*]}
do
    printf "%4d: %s\n" $index ${array[$index]}
done


echo "Upload to Live site:"
for index in ${!array[*]}
do
    printf "%4d: %s\n" $index ${array[$index]}
    rsync -azP --delete -e 'ssh -p 18765' ${array[$index]} mobelari@107.6.141.242:/home/mobelari/public_html/${array[$index]}
done

staging

#!/bin/bash

array=(
#app/code/Mobelaris/Sales/Block/Adminhtml/Item/Grid.php
#app/code/Mobelaris/Catalog/Model/Attribute/Backend/ShoppingFeedItemId.php
#app/code/Mobelaris/Catalog/Console/GoogleFeedItemId.php
#app/code/Mobelaris/Catalog/Console/GoogleFeedItemId.php
#app/code/Mobelaris/Magestore/Plugin/Ui/DataProvider/PurchaseOrder/Form/Modifier/PurchaseSumary/SupplyNeedProductDataProviderPlugin.php
#app/code/Mobelaris/Magestore/Plugin/Ui/DataProvider/PurchaseOrder/Form/Modifier/PurchaseSumary/AllSupplierProductDataProviderPlugin.php
#app/etc/env.php
#app/etc/config.php
app/code/Hieu/ImageAlt/Observer/ControllerFrontSendResponseBefore.php
#vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php
# "vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php" // fixing sorting by entity_id issue on category view page
)

echo "Array size: ${#array[*]}"

echo "Array items and indexes:"
for index in ${!array[*]}
do
    printf "%4d: %s\n" $index ${array[$index]}
done


echo "Upload to Staging site:"
for index in ${!array[*]}
do
    printf "%4d: %s\n" $index ${array[$index]}
    rsync -azP --delete -e 'ssh -p 18765' ${array[$index]} jamest75@77.104.177.209:/home/jamest75/public_html/${array[$index]}
done