Created
August 31, 2012 14:32
-
-
Save mark-poulsen/3553622 to your computer and use it in GitHub Desktop.
pass env to oil r migrate
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
/** | |
* Your environment. Can be set to any of the following: | |
* | |
* Fuel::DEVELOPMENT | |
* Fuel::TEST | |
* Fuel::STAGE | |
* Fuel::PRODUCTION | |
*/ | |
Fuel::$env = (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT); | |
if (isset($_SERVER['argv'][3])) { | |
switch (Str::lower($_SERVER['argv'][3])) { | |
case 'production': | |
Fuel::$env = Fuel::PRODUCTION; | |
break; | |
case 'development': | |
Fuel::$env = Fuel::DEVELOPMENT; | |
break; | |
case 'staging': | |
Fuel::$env = Fuel::STAGING; | |
break; | |
case 'test': | |
Fuel::$env = Fuel::TEST; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment