mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Version command.
Command for showing version.
This commit is contained in:
		
							parent
							
								
									48af7b62e2
								
							
						
					
					
						commit
						a04daec14e
					
				@ -33,6 +33,9 @@ class Mage_Console
 | 
				
			|||||||
            } else if ($this->_args[0] == 'install') {
 | 
					            } else if ($this->_args[0] == 'install') {
 | 
				
			||||||
                $this->_action = 'install';
 | 
					                $this->_action = 'install';
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
 | 
					            } else if ($this->_args[0] == 'version') {
 | 
				
			||||||
 | 
					                $this->_action = 'version';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            } else if ($this->_args[0] == 'init') {
 | 
					            } else if ($this->_args[0] == 'init') {
 | 
				
			||||||
                $this->_action = 'init';
 | 
					                $this->_action = 'init';
 | 
				
			||||||
            } 
 | 
					            } 
 | 
				
			||||||
@ -98,14 +101,18 @@ class Mage_Console
 | 
				
			|||||||
        $config->loadSCM();
 | 
					        $config->loadSCM();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Logging
 | 
					        // Logging
 | 
				
			||||||
        if ($this->getAction() == 'install') {
 | 
					        $showGrettings = true;
 | 
				
			||||||
 | 
					        if (in_array($this->getAction(), array('install', 'version'))) {
 | 
				
			||||||
            self::$_logEnabled = false;
 | 
					            self::$_logEnabled = false;
 | 
				
			||||||
 | 
					            $showGrettings = false;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            self::$_logEnabled = $config->general('logging', false);
 | 
					            self::$_logEnabled = $config->general('logging', false);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        // Grettings
 | 
					        // Grettings
 | 
				
			||||||
 | 
					        if ($showGrettings) {
 | 
				
			||||||
            Mage_Console::output('Starting <blue>Magallanes</blue>', 0, 2);
 | 
					            Mage_Console::output('Starting <blue>Magallanes</blue>', 0, 2);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        switch ($this->getAction()) {
 | 
					        switch ($this->getAction()) {
 | 
				
			||||||
            case 'deploy':
 | 
					            case 'deploy':
 | 
				
			||||||
@ -151,10 +158,21 @@ class Mage_Console
 | 
				
			|||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					            case 'version';
 | 
				
			||||||
 | 
					                $this->showVersion();
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					        if ($showGrettings) {
 | 
				
			||||||
            Mage_Console::output('Finished <blue>Magallanes</blue>', 0, 2);
 | 
					            Mage_Console::output('Finished <blue>Magallanes</blue>', 0, 2);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public function showVersion()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Mage_Console::output('Running <blue>Magallanes</blue> version <dark_gray>' . MAGALLANES_VERSION .'</dark_gray>', 0, 2);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    public static function log($message, $continuation = false)
 | 
					    public static function log($message, $continuation = false)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								bin/mage
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								bin/mage
									
									
									
									
									
								
							@ -1,4 +1,5 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					#VERSION:0.9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SCRIPT=$(readlink -f $0)
 | 
					SCRIPT=$(readlink -f $0)
 | 
				
			||||||
DIR=$(dirname $SCRIPT)
 | 
					DIR=$(dirname $SCRIPT)
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,7 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
# sudo mage install
 | 
					# sudo mage install
 | 
				
			||||||
 | 
					# mage version
 | 
				
			||||||
 | 
					# mage upgrade
 | 
				
			||||||
# mage config add host s05.example.com to:[production]
 | 
					# mage config add host s05.example.com to:[production]
 | 
				
			||||||
# mage config git git://github.com/andres-montanez/Zend-Framework-Twig-example-app.git
 | 
					# mage config git git://github.com/andres-montanez/Zend-Framework-Twig-example-app.git
 | 
				
			||||||
# mage config svn svn://example.com/repo
 | 
					# mage config svn svn://example.com/repo
 | 
				
			||||||
@ -22,6 +24,8 @@ date_default_timezone_set('UTC');
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
$baseDir = dirname(dirname(__FILE__));
 | 
					$baseDir = dirname(dirname(__FILE__));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define('MAGALLANES_VERSION', '0.9');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require_once $baseDir . '/Mage/Autoload.php';
 | 
					require_once $baseDir . '/Mage/Autoload.php';
 | 
				
			||||||
spl_autoload_register(array('Mage_Autoload', 'autoload'));
 | 
					spl_autoload_register(array('Mage_Autoload', 'autoload'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user