Last active
March 3, 2020 17:11
-
-
Save Rud5G/5162269 to your computer and use it in GitHub Desktop.
This file contains 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
# location: https://gist.github.com/Rud5G/5162269 | |
# installer mage-ci: https://raw.github.com/EcomDev/MageCI/master/installer | |
# installer composer: curl -sS https://getcomposer.org/installer | php | |
echo "usage: copy manual to shell, to update commands" | |
exit | |
# defines | |
export IMM_GIT_USER= | |
export IMM_MODULENAME= | |
export IMM_DBNAME= | |
export IMM_DBPASSWORD= | |
export IMM_MAGE=1.7.0.2 | |
export IMM_ROOT_DOMAIN=${USER}-magento-test-modules.local | |
# example | |
git clone git://github.com/${IMM_GIT_USER}/${IMM_MODULENAME}.git | |
cd ${IMM_MODULENAME} | |
# Fixing Magento hackathon installer | |
mkdir -p tests/magento | |
# Installing required composer packages | |
composer update --dev | |
# | |
# CHOOSE with or without SAMPLE data. | |
# | |
# first with sample data: | |
# | |
# Installing magento version with sample data | |
# download sample data | |
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz | |
# sample data for magento 1.5.1.0 | |
# http://www.magentocommerce.com/downloads/assets/1.2.0/magento-sample-data-1.2.0.tar.gz | |
tar zxvf magento-sample-data-*.tar.gz | |
echo "DROP DATABASE IF EXISTS ${IMM_DBNAME}; CREATE DATABASE ${IMM_DBNAME};" | mysql -uroot -p${IMM_DBPASSWORD} | |
mysql -uroot -p${IMM_DBPASSWORD} ${IMM_DBNAME} < magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql | |
mage-ci install tests/magento $IMM_MAGE ${IMM_DBNAME} \ | |
-d /tmp/magento-install \ | |
-u root \ | |
-p ${IMM_DBPASSWORD} \ | |
-b http://${IMM_ROOT_DOMAIN}/${IMM_MODULENAME}/tests/magento/ | |
# | |
# OR | |
# | |
# Installing magento version without sample data | |
mage-ci install tests/magento ${IMM_MAGE} ${IMM_DBNAME} \ | |
-c \ | |
-d /tmp/magento-install \ | |
-u root \ | |
-p ${IMM_DBPASSWORD} \ | |
-b http://${IMM_ROOT_DOMAIN}/${IMM_MODULENAME}/tests/magento/ | |
# set rights | |
chmod -R 777 tests/magento/{var,media} | |
# Create modman if not exists | |
#for file in `find * -type f | grep -v tests/ | grep -v 'magento-sample-data'`; do echo "$file $file" >> modman; done | |
# Installing module | |
mage-ci install-module tests/magento $(pwd) | |
# admin-password: 123123test | |
# deinstall module | |
mage-ci uninstall-module tests/magento $(pwd) | |
# deinstall | |
mage-ci uninstall tests/magento/ ${IMM_DBNAME} -u root -p ${IMM_DBPASSWORD} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment