Skip to content

Commit

Permalink
Improve the OE version detection for tasks, and fix commands for 11.7…
Browse files Browse the repository at this point in the history
… actions. (#38)

Co-authored-by: DustinGrau-PSC <[email protected]>
  • Loading branch information
DustinGrau-PSC and DustinGrau-PSC authored May 6, 2024
1 parent 6b1117b commit 6d3744f
Show file tree
Hide file tree
Showing 4 changed files with 782 additions and 293 deletions.
79 changes: 77 additions & 2 deletions PAS/Management/OEManager/ABL/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,83 @@
<property name="oe.version" value="${oeMajor}.${oeMinor}.${oeRev}"/>
<echo message="OpenEdge Version: ${oe.version}"/>

<!-- Add the ANT-Contrib library to this environment (present in 11.7.4+ and 12.0+). -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dlcHome}/ant/lib/ant-contrib-0.6.jar"/>
<!-- Add the appropriate ANT-Contrib library to this environment (v0.6 present in 11.7.4+ and 12.0+ and updated to v1.0b3 in 12.8+). -->
<loadtask resource="net/sf/antcontrib/antcontrib.properties" classfile="${dlcHome}/ant/lib/ant-contrib-0.6.jar"/>
<loadtask resource="net/sf/antcontrib/antcontrib.properties" classfile="${dlcHome}/ant/lib/ant-contrib-1.0b3.jar"/>

<!-- Use the ProgressVersion output to determine what release is running in the dlcHome. -->

<!-- Support for only the 11.7 LTS release. -->
<if>
<equals arg1="${oeMajor}" arg2="11"/>
<then>
<property name="isOE11" value="true"/>
<condition property="isOE117">
<and>
<isset property="isOE11"/>
<equals arg1="${oeMinor}" arg2="7"/>
</and>
</condition>
</then>
</if>

<!-- Support for 12.x LTS and feature releases. -->
<if>
<equals arg1="${oeMajor}" arg2="12"/>
<then>
<property name="isOE12" value="true"/>
<switch value="${oeMinor}">
<case value="2">
<property name="isOE122" value="true"/>
</case>
<case value="3">
<property name="isOE122" value="true"/>
<property name="isOE123" value="true"/>
</case>
<case value="4">
<property name="isOE122" value="true"/>
<property name="isOE124" value="true"/>
</case>
<case value="5">
<property name="isOE122" value="true"/>
<property name="isOE125" value="true"/>
</case>
<case value="6">
<property name="isOE122" value="true"/>
<property name="isOE126" value="true"/>
</case>
<case value="7">
<property name="isOE122" value="true"/>
<property name="isOE127" value="true"/>
</case>
<case value="8">
<property name="isOE128" value="true"/>
</case>
</switch>
</then>
</if>

<!-- Support for 13.x LTS and feature releases. -->
<if>
<equals arg1="${oeMajor}" arg2="13"/>
<then>
<property name="isOE13" value="true"/>
</then>
</if>
</sequential>
</macrodef>

<macrodef name="loadtask">
<!-- Usage <loadtask resource="_resource_string_" classfile="_path_to_file_"/> -->
<attribute name="resource"/>
<attribute name="classfile"/>

<sequential>
<condition property="file.exists">
<available file="@{classfile}" type="file"/>
</condition>

<taskdef resource="@{resource}" classpath="@{classfile}"/>
</sequential>
</macrodef>

Expand Down
Loading

0 comments on commit 6d3744f

Please sign in to comment.