Sunday, April 21, 2013

How to upgrade SNAPSHOT version of carbon trunk


When upgrading a SNAPSHOT we need to apply this upgrade on orbit, kernal and platform trunks respectively. When upgrading we need to consider different types of SNAPSHOT entries on different files on trunk. I'm creating this tutorial because this will be useful to someone like I did :)

1) First we need to change all the x.x.0-SNAPSHOT entries of pom.xml files to next version value (ex: 4.1.0-SNAPSHOT to 4.2.0-SNAPSHOT)
this could be easily done using a single command
find . -name 'pom.xml'|xargs sed -i 's/4\.1\.0-SNAPSHOT/4\.2\.0-SNAPSHOT/g'

2) Need to change the 4.1.0.SNAPSHOT entry from carbon.product file (ex: 4.1.0.SNAPSHOT to 4.2.0.SNAPSHOT) on following directories
trunk/distribution/kernel/carbon.product
distribution/product/modules/p2-profile-gen/carbon.product

3) Need to change the x.x.0-SNAPSHOT entry on filter.properties file on following directory
kernal/trunk/distribution/product/modules/distribution/src/assembly

4) And on kernal and platform trunks extend the range of the valid snapshot versions according to our upgrade on parant/pom.xml
ex:
<carbon.platform.package.import.version.range>[4.1.0-SNAPSHOT, 4.2.0)
        </carbon.platform.package.import.version.range> 
to
<carbon.platform.package.import.version.range>[4.2.0-SNAPSHOT, 4.3.0)
        </carbon.platform.package.import.version.range>

No comments:

Post a Comment