Skip to main content



      Home
Home » Archived » Buckminster » How to get Qualifier from build
How to get Qualifier from build [message #760712] Sun, 04 December 2011 11:09 Go to next message
Eclipse UserFriend
Is there a way to write the qualifier used in the current build to a file for example?
Re: How to get Qualifier from build [message #760760 is a reply to message #760712] Mon, 05 December 2011 01:38 Go to previous message
Eclipse UserFriend
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
Previous Topic:How to discard qualifier
Next Topic:Can't install Buckminster Headless
Goto Forum:
  


Current Time: Wed Jul 23 07:58:45 EDT 2025

Powered by FUDForum. Page generated in 0.53817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top