6

I'm trying to make sense on the best way to do automatize a series of things in a row in order to deploy a web-app and haven't yet came up with a suitable solution. I would like to:

  1. use google's compiler.jar to minify my JS
  2. use yahoo's yui-compressor.jar to minify my CSS
  3. access a file and change a string so that header files like "global.css?v=21" get served the correct version
  4. deploy the app (sftp, mercurial or rsync?) omitting certain directories like "/userfiles"

Can you guys put me on the right track to solve this?

Thank you!

1
  • Sounds like a great application of Maven and ANT. Check those two tools out.
    – mattbasta
    May 2, 2010 at 19:34

3 Answers 3

6

you may want to check out phing http://phing.info/ (they are in the process of moving servers so may be down this weekend), but it can do all of what you are wanting and is written in php. A quick google search should bring up plenty of tutorials to get you started.

2
  • 1
    I've been playing around with Phing and haven't yet made it do all the things I wished for but it does seam like the way to go. One thing I did find lacking was recursive SCP support. I'll probably go with rSync: fedecarg.com/projects/show/filesynctask
    – Frankie
    Jun 2, 2010 at 16:58
  • Frankie you may want to look at the exec task or check the doc on writing a custom task. Jun 2, 2010 at 18:20
2

You can run php from the command line to do all sorts of fun things.

$ php script_name.php arg1 arg2

See: command line, argv, argc, exec

Running PHP from the command line is very fast. I've been doing this a lot lately for various automation tasks.

0
0

I generally run Python projects so this may or may not be an option for you: but apart from writing your own scripts you could look into the following:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.