Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

! Add MageCI tool installer

  • Loading branch information...
commit c92ff642948a8d6a45d1b8693ac57d0bf31122ba 1 parent f23611e
@IvanChepurnyi IvanChepurnyi authored
Showing with 51 additions and 1 deletion.
  1. +24 −1 bin/mage-ci
  2. +27 −0 installer
View
25 bin/mage-ci
@@ -11,7 +11,7 @@
#
# @category EcomDev
# @package EcomDev/MageCI
-# @copyright Copyright (c) 2012 EcomDev BV (http://www.ecomdev.org)
+# @copyright Copyright (c) 2013 EcomDev BV (http://www.ecomdev.org)
# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
# @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>
@@ -75,6 +75,9 @@ ${MAGECIF[4]}$ mage-ci db-dump <directory> <prefix> <version1> ... <versionN> <O
${MAGECIF[4]}$ mage-ci phpunit <directory> <OPTIONS> ${MAGECIF[0]}
Runs unit tests for all phpunit.xml or phpunit.dist.xml files in <directory> or its subdirectories. <OPTIONS> will be passed directly to phpunit.
+
+${MAGECIF[4]}$ mage-ci shell <magento_directory> <script_name> <OPTIONS> ${MAGECIF[0]}
+ Runs magento shell script with name <script_name> at <magento_directory>/shell directory with specified options.
"
}
@@ -84,6 +87,25 @@ show_usage ()
exit 1;
}
+run_shell ()
+{
+ local magento_dir=$1
+ local current_dir=$(pwd)
+ local script_name=$2
+ shift 2;
+
+ # Check that first parameter is directory
+ if [ ! -d "$magento_dir/shell" ]
+ then
+ echo "${MAGECIF[3]}Magento shell directory is not found at $magento_dir/shell ${MAGECIF[0]}"
+ exit 1
+ fi
+
+ cd $magento_dir/shell
+ php -f $script_name -- ${@}
+ check_error_exit
+}
+
run_phpunit ()
{
local test_dir=$1;
@@ -600,5 +622,6 @@ uninstall) uninstall_magento "$@" ;;
install-multiple) install_multiple_magento "$@" ;;
db-dump) dump_magento "$@" ;;
phpunit) run_phpunit "$@" ;;
+shell) run_shell "$@" ;;
*) show_usage ;;
esac
View
27 installer
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+#
+# Magento Continuous Integration Tools
+#
+# NOTICE OF LICENSE
+#
+# This source file is subject to the Open Software License (OSL 3.0)
+# that is bundled with this package in the file LICENSE.txt.
+# It is also available through the world-wide-web at this URL:
+# http://opensource.org/licenses/osl-3.0.php
+#
+# @category EcomDev
+# @package EcomDev/MageCI
+# @copyright Copyright (c) 2013 EcomDev BV (http://www.ecomdev.org)
+# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+# @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>
+
+current_dir=$(pwd)
+
+# create bin directory in current dir
+if [ ! -d "$current_dir/bin" ]
+then
+ mkdir -p $current_dir/bin
+fi
+
+wget -q -O $current_dir/bin/mage-ci https://raw.github.com/EcomDev/MageCI/master/bin/mage-ci --no-check-certificate
+chmod +x $current_dir/bin/mage-ci
Please sign in to comment.
Something went wrong with that request. Please try again.