Skip to content

Commit

Permalink
Update default openjdk repo and branch if only jdkversion is provided (
Browse files Browse the repository at this point in the history
…#5649)

* remove logic to detect if jdkDDu exist or not

* set default dev branch for jdk23+

* add back check jdkDDu repo
  • Loading branch information
sophia-guo authored Oct 3, 2024
1 parent 46f1c11 commit 2e34bbf
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions openjdk/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
<property name="regressionRepo" value="https://github.com/ibmruntimes/${jdkName}.git"/>
</else>
</if>
<property name="defaultBranch" value=""/>
</then>
<else>
<if>
Expand All @@ -192,28 +193,31 @@
<then>
<echo message="Command passed. Setting repo name to the 'u' version."/>
<property name="jdkName" value="jdk${JDK_VERSION}u"/>
<property name="defaultBranch" value="-b dev"/>
</then>
<else>
<echo message="Command failed, or tried to ask for a username due to access restrictions. Or both."/>
<echo message="Setting repo name to the non-'u' version."/>
<property name="jdkName" value="jdk${JDK_VERSION}"/>
<property name="jdkName" value="jdk"/>
<exec executable="curl" outputproperty="jsonRelease">
<arg value="-s"/>
<arg value="https://api.adoptium.net/v3/info/available_releases"/>
</exec>
<propertyregex property="tipVersion" input="${jsonRelease}" regexp='"tip_version":\s*([0-9]+)' select="\1" defaultValue="0"/>
<if>
<equals arg1="${JDK_VERSION}" arg2="${tipVersion}"/>
<then>
<property name="defaultBranch" value="-b dev"/>
</then>
<else>
<property name="defaultBranch" value="-b dev_jdk${JDK_VERSION}"/>
</else>
</if>
</else>
</if>
</else>
</if>
<property name="regressionRepo" value="https://github.com/adoptium/${jdkName}.git"/>
</else>
</if>
<if>
<contains string="${JDK_IMPL}" substring="hotspot"/>
<then>
<!-- Adoptium nightly is using dev branch and default branch is master-->
<property name="defaultBranch" value="-b dev"/>
</then>
<else>
<property name="defaultBranch" value=""/>
</else>
</if>
<if>
<isset property="OPENJDK_SHA_ISSET"/>
<then>
Expand Down

0 comments on commit 2e34bbf

Please sign in to comment.