|
Re: How to get Qualifier from build [message #760760 is a reply to message #760712] |
Mon, 05 December 2011 01:38  |
Eclipse User |
|
|
|
hi thomas,
you can extract the qualifier from a bundle manifest using an ant script:
<project>
<macrodef name="extractManifestVersion">
<attribute name="file" />
<attribute name="property" />
<sequential>
<loadfile property="@{property}" srcfile="@{file}">
<filterchain>
<linecontains>
<contains value="Bundle-Version:"/>
</linecontains>
<striplinebreaks/>
<replaceregex pattern="^Bundle-Version: \d+\.\d+\.\d+\.(.*)" replace="\1" />
</filterchain>
</loadfile>
</sequential>
</macrodef>
<target name="setProductVersion">
<extractManifestVersion file="${sp:manifest.mf}" property="bundle.version" />
<echo>Set version in ${sp:product.properties} to '${bundle.version}'</echo>
<replace file="${sp:product.properties}" token="%REL_Nr%" value="${bundle.version}" />
</target>
</project>
the ant target above extracts the qualifier from the bundle version and writes it to a file.
hth
jakob
|
|
|
Powered by
FUDForum. Page generated in 0.03788 seconds