You don’t like Mondays? I hope this gives you a good start in the new week.
We published a new n98-magerun release and packed some nice features in it.

Script Features

The script command will be more powerful.
We changed the behavior of variables initalized with “?” for example ${foo}=?.
If you define a variable from outside n98-magerun will not prompt anymore. This give you the power
to write parameterized scripts.

Another new feature are variable “choices”.
You can now specify a list of values which can be selected.

Example:

${foo}=?[a,b,c]

This will show you a prompt where you can select between “a”, “b” and “c”.

Please enter a value for ${foo}: 
  [0] a
  [1] b
  [2] c
> 

Script Repository

If you run a script from script repository (script:repo:run command) you are now able to specify variables from outside.
The “–define” option is now available for this command.

Updated dependencies

We ship n98-magerun with the latest Symfony and Twig compontents.

db:dump command

  • Added an ‘–add-routines’ option to db:dump command. (by Pieter Hoste)

dev:symlinks

The dev:symlinks command will now show you the admin store in the list of stores to select if you don’t specify
any store code.

Bugfixes

  • script command: Fixed resolution of other variables
  • Fix flush to use Enterprise_PageCache_Model_Cache only for 1.11 and up (by Jay Becker)

Happy coding!


3 Comments

shirtsofholland · November 2, 2013 at 13:32

thanks, this sounds good. I think it is time for us to start using this 😉

1 qustion though: could it help us create make a nightly backup from production -> test environment
copy all data
copy all database
update core_config
change settings in /etc/local.xml

major thanks!

    Christian Münch · November 2, 2013 at 14:02

    You can use the db:dump command with –strip option to create dumps which i.e. does not contain real customer data.
    With the db:import command you can import the data to test environment.
    The config:delete and config:set commands can update your store config (core_config_data table). You can put all command together with the script command.

    We update our staging server at netz98 in this way.

      shirtsofholland · November 2, 2013 at 17:49

      Hi Christian, that sound good! Would you be willing to share your script (or part of) – or maybe this would make an interesting blog article. Look forward to hearing ;P

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.