diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index b4fa520cc..32f4ded92 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -1,5 +1,6 @@ name: build-docbook on: push + jobs: check_branch: runs-on: ubuntu-latest @@ -36,6 +37,7 @@ jobs: needs: check_branch env: HAVE_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN != '' }} + HAVE_GPGKEYURI: ${{ secrets.ACCESS_TOKEN != '' && secrets.GPGKEYURI != '' }} HAVE_SAXON_EE: ${{ secrets.SAXON_PASSPHRASE != '' }} CIWORKFLOW: yes CI_SHA1: ${{ github.sha }} @@ -135,6 +137,18 @@ jobs: files: | build/distributions/docbook-xslTNG-${{ env.CI_TAG }}.zip + - name: Publish to Sonatype + if: ${{ env.HAVE_GPGKEYURI == 'true' && env.CI_BRANCH == 'main' && env.CI_TAG != '' }} + run: | + curl -s -o secret.gpg ${{ secrets.GPGKEYURI }} + ./gradlew -PsonatypeUsername=${{ secrets.SONATYPEUSER }} \ + -PsonatypePassword="${{ secrets.SONATYPEPASS }}" \ + -Psigning.keyId="${{ secrets.SIGNKEY }}" \ + -Psigning.password="${{ secrets.SIGNPSW }}" \ + -Psigning.secretKeyRingFile=./secret.gpg \ + publish + rm -f secret.gpg + - name: Checkout the CDN uses: actions/checkout@v3 if: ${{ env.HAVE_ACCESS_TOKEN == 'true' && env.CI_BRANCH == 'main' && env.CI_TAG != '' }} diff --git a/buildSrc/src/main/java/org/docbook/xsltng/extensions/Cwd.java b/buildSrc/src/main/java/org/docbook/xsltng/extensions/Cwd.java index 509884d5c..92ff2de8f 100644 --- a/buildSrc/src/main/java/org/docbook/xsltng/extensions/Cwd.java +++ b/buildSrc/src/main/java/org/docbook/xsltng/extensions/Cwd.java @@ -16,7 +16,7 @@ * Saxon * extension to return the current working directory (the user.dir system property). * - *
Copyright © 2011-2020 Norman Walsh. + *
Copyright © 2011-2023 Norman Walsh.
*
* @author Norman Walsh
* ndw@nwalsh.com
@@ -61,7 +61,16 @@ public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPa
if (!dir.endsWith("/")) {
dir += "/";
}
- return new AnyURIValue(dir);
+
+ // 21 Jan 2023, make this a file: URI. Previously, this was left as just a path
+ // and it was made absolute against the static base uri. But that doesn't work
+ // correctly if the static base URI is, for example https://cdn.docbook.org/...
+ if (dir.startsWith("/")) {
+ return new AnyURIValue("file:" + dir);
+ } else {
+ // Windows, for example, where dir might be C:\...
+ return new AnyURIValue("file:/" + dir);
+ }
}
}
}
diff --git a/properties.gradle b/properties.gradle
index 640b0a442..f178cc4b2 100644
--- a/properties.gradle
+++ b/properties.gradle
@@ -2,8 +2,8 @@
ext {
xslTNGtitle = 'DocBook xslTNG'
xslTNGbaseName = 'docbook-xslTNG'
- xslTNGversion = '2.0.3'
- guideVersion = '2.0.3'
+ xslTNGversion = '2.0.4'
+ guideVersion = '2.0.4'
guidePrerelease = true
docbookVersion = '5.2CR4'
diff --git a/src/guide/xml/ref-params.xml b/src/guide/xml/ref-params.xml
index 254f4b34b..bfe22a799 100644
--- a/src/guide/xml/ref-params.xml
+++ b/src/guide/xml/ref-params.xml
@@ -736,9 +736,7 @@ support keyboard navigation.