Omaha #3481 - match additional FOSS patterns in p2-build.xml. Make it possible to specify features that should not be

built into an RPM for Work Assignments.


Former-commit-id: 6a5bfb0e00bee647632f12d81bb532a3583f955e
This commit is contained in:
Bryan Kowal 2014-08-06 17:45:45 -05:00
parent 317548b267
commit 2687b16d49
2 changed files with 73 additions and 1 deletions

View file

@ -113,6 +113,12 @@
<fileset dir="${workspace.dir}"
includes="it.*/**" />
</copy>
<echo message="PLUGINS: v*/**" />
<copy todir="${basedir}/cave/p2/plugins">
<fileset dir="${workspace.dir}"
includes="v*/**" />
</copy>
<echo message="PLUGINS: ch.*/**" />
<copy todir="${basedir}/cave/p2/plugins">
@ -352,7 +358,38 @@
</for>
</target>
<target name="main" depends="clean, p2.build, wa-build" />
<target name="wa-cleanup" depends="wa-build" description="Removes references to WA-specific features that should not be built as an RPM.">
<for param="wa.feature.list.file">
<fileset dir="${basedir}" includes="*-wa-build.properties" />
<sequential>
<var name="wa.features.ignore" unset="true" />
<property file="@{wa.feature.list.file}" />
<for list="${wa.features.ignore}" param="wa.feature">
<sequential>
<if>
<available file="${basedir}/cave/p2/features/@{wa.feature}" type="dir" />
<then>
<!-- Remove the feature directory. -->
<delete includeemptydirs="true">
<fileset dir="${basedir}/cave/p2/features/@{wa.feature}" />
</delete>
<!-- Remove references to the feature from features.txt -->
<exec executable="/bin/sed" output="${basedir}/cave/p2/dist/features.txt.tmp">
<arg value="/@{wa.feature}/d" />
<arg value="${basedir}/cave/p2/dist/features.txt" />
</exec>
<move file="${basedir}/cave/p2/dist/features.txt.tmp"
tofile="${basedir}/cave/p2/dist/features.txt" />
</then>
</if>
</sequential>
</for>
</sequential>
</for>
</target>
<target name="main" depends="clean, p2.build, wa-build, wa-cleanup" />
<target name="p2.build.repo">
<!-- Copy The Feature -->

View file

@ -158,8 +158,43 @@
</sequential>
</for>
<antcall target="wa-cleanup" />
<antcall target="clean" />
</target>
<target name="wa-cleanup" description="Removes references to WA-specific features that should not be built as an RPM.">
<for param="wa.feature.list.file">
<fileset dir="${basedir}" includes="*-wa-build.properties" />
<sequential>
<var name="wa.features.ignore" unset="true" />
<property file="@{wa.feature.list.file}" />
<for list="${wa.features.ignore}" param="wa.feature">
<sequential>
<propertyregex property="edex.component"
override="true"
input="@{wa.feature}"
regexp="\."
replace="-" />
<propertyregex property="edex.component"
override="true"
input="${edex.component}"
regexp="com-raytheon-uf-(.+)-feature"
select="\1" />
<if>
<available file="${basedir}/edex/dist/${edex.component}.zip" />
<then>
<!-- Remove the feature zip file. -->
<delete file="${basedir}/edex/dist/${edex.component}.zip"
failonerror="true" />
</then>
</if>
</sequential>
</for>
</sequential>
</for>
</target>
<target name="main" depends="clean, main-build, wa-build" />