katratxo on Software Development

tail -f /var/log/brain | grep -i software

Archive for January 2011

Update: Making a snapshot of your Openbravo instance

with 4 comments

I just updated the snapshot.xml script adding a new property exclude where you can define as comma separated values the patterns you want to exclude from the zip file.

If you are not familiar with this script, I suggest you read my previous post on how to make a snapshot of your Openbravo instance

I tested in some recent revision from pi, and excluding Mercurial metadata and the resulting zip file is almost 350MB smaller!

~/workspace/src/openbravo $ ls -lh openbravo-2011*
-rw-r--r-- 1 iperdomo iperdomo 254M Jan  5 11:04 openbravo-2011-01-05_11-02-07.zip
-rw-r--r-- 1 iperdomo iperdomo 603M Jan  5 11:19 openbravo-2011-01-05_11-10-58.zip

How it works?

You just need to append the property with the list of excluding patterns in the ant call, e.g. Let’s exclude all the .hg folder

~/workspace/src/openbravo/pi $ ant -f snapshot.xml -Dexclude=".hg/**"

The exclude property is passed directly to the Zip task. In order to understand how can you define exclusion patters read the Zip task documentation

Happy new year!

Advertisements

Written by katratxo

January 6, 2011 at 10:19 am