Skip to content

Commit

Permalink
Merge pull request #465 from ndw/fix-web-build
Browse files Browse the repository at this point in the history
Fix build issues in CI
  • Loading branch information
ndw authored Jan 31, 2024
2 parents 9d6e78d + a3ebd53 commit ca65487
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ task webHtml(type: Copy, dependsOn: ['report', 'webHomepage']) {
exclude "homepage.html"
}

def buildTag = System.getenv()["CIRCLE_TAG"]
def buildTag = System.getenv()["CI_TAG"]
if (buildTag == null) {
buildTag = ""
}
Expand Down
19 changes: 16 additions & 3 deletions tools/homepage.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,30 @@
select="'https://api.github.com/repos/' || $org || '/' || $repo || '/releases'"/>

<xsl:variable name="release" as="map(*)">
<xsl:variable name="releases" as="array(*)">
<xsl:variable name="try-releases" as="array(*)">
<xsl:try>
<xsl:message select="'Attempt to read', resolve-uri('../build/releases.json', static-base-uri())"/>
<xsl:message select="'Reading releases from', resolve-uri('../build/releases.json', static-base-uri())"/>
<xsl:sequence select="parse-json(unparsed-text('../build/releases.json'))"/>
<xsl:catch xmlns:err="http://www.w3.org/2005/xqt-errors">
<xsl:message select="'Attempt failed, trying', $reluri"/>
<xsl:message select="'Read failed, trying', $reluri"/>
<xsl:message select="$err:code, $err:description"/>
<xsl:sequence select="parse-json(unparsed-text($reluri))"/>
</xsl:catch>
</xsl:try>
</xsl:variable>

<xsl:variable name="releases" as="array(*)">
<xsl:choose>
<xsl:when test="array:size($try-releases) = 0">
<xsl:message select="'No published releases, trying', $reluri"/>
<xsl:sequence select="parse-json(unparsed-text($reluri))"/>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="$try-releases"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:sequence select="array:get($releases, 1)"/>
</xsl:variable>

Expand Down

0 comments on commit ca65487

Please sign in to comment.