From 4ebbcb01ae8d73be14ed97d3f1a8d1282b3b1c75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 08:07:29 +0000 Subject: [PATCH 01/33] Update dependency org.mozilla:rhino to v1.8.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 452375fb..43519ce0 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208' implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208' - implementation 'org.mozilla:rhino:1.7.13' + implementation 'org.mozilla:rhino:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' implementation 'xmlrpc:xmlrpc:2.0.1' From f7fe09a29454b0fbaaead1817d0f72360c7a6326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 09:53:53 +0100 Subject: [PATCH 02/33] Switch to rhino-all.jar, Helma needs the full Rhino experience --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 43519ce0..e920c689 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208' implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208' - implementation 'org.mozilla:rhino:1.8.0' + implementation 'org.mozilla:rhino-all:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' implementation 'xmlrpc:xmlrpc:2.0.1' From 28887aaccde077a1e2c17f256100b30244d755be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 09:32:00 +0000 Subject: [PATCH 03/33] Update dependency org.mozilla:rhino to v1.8.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 38eb392b..6bb788b9 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.eclipse.jetty:jetty-servlet:9.4.56.v20240826' implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826' - implementation 'org.mozilla:rhino:1.7.13' + implementation 'org.mozilla:rhino:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' implementation 'xmlrpc:xmlrpc:2.0.1' From cbb6599ce0e8c3689af8d990cdc9b710e9bab26b Mon Sep 17 00:00:00 2001 From: tobi Date: Fri, 3 Jan 2025 11:46:46 +0000 Subject: [PATCH 04/33] Add Renovate workflow --- .github/workflows/renovate.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/renovate.yml diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 00000000..2fcf99f1 --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,40 @@ +name: Run Renovate + +on: + workflow_dispatch + #schedule: + # - cron: "13 * * * *" + +jobs: + renovate: + runs-on: antville + + steps: + - uses: actions/checkout@v4 + + - name: Run Renovate + run: npx renovate + env: + # Renovate is using this token to retrieve release notes + GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} + # See + LOG_LEVEL: info # debug | info | warn | error | fatal + RENOVATE_AUTODISCOVER: 'true' + RENOVATE_CONFIG_FILE: renovate.json + RENOVATE_ENDPOINT: ${{ github.api_url }} + RENOVATE_GIT_AUTHOR: Renovate Bot + #RENOVATE_GIT_IGNORED_AUTHORS: + # - 29139614+renovate[bot]@users.noreply.github.com + RENOVATE_IGNORE_PR_AUTHOR: 'true' + RENOVATE_LOG_FILE: renovate-log.ndjson + RENOVATE_LOG_FILE_LEVEL: debug + RENOVATE_PLATFORM: gitea + RENOVATE_REPOSITORY_CACHE: 'enabled' + # github.token is not working here, it lacks some permissions required by Renovate + RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} + + - name: Save log file + uses: actions/upload-artifact@v3 + with: + name: renovate-log.ndjson + path: renovate-log.ndjson From 3284a1ca19340b949b769fd6b17250264820856b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 3 Jan 2025 11:57:30 +0000 Subject: [PATCH 05/33] Update actions/upload-artifact action to v4 --- .github/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 2fcf99f1..27f81ba1 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -34,7 +34,7 @@ jobs: RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} - name: Save log file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: renovate-log.ndjson path: renovate-log.ndjson From c1e9371f6bc4614d5f1f5527f87719b44a05a463 Mon Sep 17 00:00:00 2001 From: tobi Date: Fri, 3 Jan 2025 11:59:50 +0000 Subject: [PATCH 06/33] Update .github/workflows/renovate.yml --- .github/workflows/renovate.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 2fcf99f1..f35a2569 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -1,9 +1,8 @@ name: Run Renovate on: - workflow_dispatch - #schedule: - # - cron: "13 * * * *" + schedule: + - cron: "13 * * * *" jobs: renovate: @@ -31,7 +30,7 @@ jobs: RENOVATE_PLATFORM: gitea RENOVATE_REPOSITORY_CACHE: 'enabled' # github.token is not working here, it lacks some permissions required by Renovate - RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} + RENOVATE_TOKEN: ${{ secrets.renovate_token }} - name: Save log file uses: actions/upload-artifact@v3 From c2b37a8243a6a52e8e0bffeb114198160bd205da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 13:35:33 +0100 Subject: [PATCH 07/33] Update workflows for Forgejo runner --- .github/workflows/deploy.yml | 9 +-------- .github/workflows/release.yml | 17 +++++------------ .github/workflows/stage.yml | 20 ++------------------ 3 files changed, 8 insertions(+), 38 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c01702e5..cdad2c55 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,19 +4,12 @@ on: workflow_dispatch jobs: deploy: - runs-on: ubuntu-latest + runs-on: antville environment: name: weblogs.at url: https://weblogs.at steps: - - name: Set up SSH agent - uses: antville/helma/.github/actions/ssh@helma-🐜 - with: - config: ${{ vars.SSH_CONFIG }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} - - name: Copy files to production server run: ssh staging-server deploy-helma diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59d8f365..b189f260 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: antville env: GH_TOKEN: ${{ github.token }} @@ -19,27 +19,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 21 - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle run: ./gradlew assembleDist - name: Create release + # FIXME: Currently only outputs gh command; adapt for Forgejo run: | - gh release create "$GITHUB_REF_NAME" \ + echo gh release create "$GITHUB_REF_NAME" \ --repo "$GITHUB_REPOSITORY" \ --title "$(date +'%d %b %Y')" \ --generate-notes - name: Upload assets + # FIXME: Currently only outputs gh command; adapt for Forgejo run: | - gh release upload "$GITHUB_REF_NAME" \ + echo gh release upload "$GITHUB_REF_NAME" \ build/distributions/helma-*.* \ --clobber diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index eac49cc3..17e693d4 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -4,31 +4,15 @@ on: workflow_dispatch jobs: stage: - runs-on: ubuntu-latest + runs-on: antville environment: name: stage - url: https://antville-test.online + url: ${{ vars.stage_url }} steps: - uses: actions/checkout@v4 - - name: Set up SSH agent - uses: ./.github/actions/ssh - with: - config: ${{ vars.SSH_CONFIG }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} - - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 21 - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle run: ./gradlew installDist From 66fa98353ee5287aae50a6c864b248ed5f095c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:22:23 +0100 Subject: [PATCH 08/33] Add the actual version string to helma.main.Server again --- build.gradle | 1 + src/main/java/helma/main/Server.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 620f953f..abf4287f 100644 --- a/build.gradle +++ b/build.gradle @@ -172,6 +172,7 @@ tasks.register('processSource', Sync) { line -> line .replaceAll('__builddate__', new Date().format("d MMM yyyy")) .replaceAll('__commithash__', gitOutput.toString().trim()) + .replaceAll('__version__', version) } into "${project.buildDir}/src" } diff --git a/src/main/java/helma/main/Server.java b/src/main/java/helma/main/Server.java index b747f11e..90564689 100644 --- a/src/main/java/helma/main/Server.java +++ b/src/main/java/helma/main/Server.java @@ -36,7 +36,7 @@ import helma.util.ResourceProperties; */ public class Server implements Runnable { // version string - public static final String version = "🐜"; + public static final String version = "__version__"; // build date public static final String buildDate = "__builddate__"; From d10f8d6d90c492533677ffca2a15234905cb0485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:22:47 +0100 Subject: [PATCH 09/33] Replace elaborate checks for Java version with single one for Java 11 --- src/main/java/helma/main/Server.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/helma/main/Server.java b/src/main/java/helma/main/Server.java index 90564689..6155de3b 100644 --- a/src/main/java/helma/main/Server.java +++ b/src/main/java/helma/main/Server.java @@ -151,13 +151,8 @@ public class Server implements Runnable { public static void checkJavaVersion() { String javaVersion = System.getProperty("java.version"); - if ((javaVersion == null) || javaVersion.startsWith("1.5") - || javaVersion.startsWith("1.4") - || javaVersion.startsWith("1.3") - || javaVersion.startsWith("1.2") - || javaVersion.startsWith("1.1") - || javaVersion.startsWith("1.0")) { - System.err.println("This version of Helma requires Java 1.6 or greater."); + if ((javaVersion == null) || !javaVersion.startsWith("11")) { + System.err.println("This version of Helma requires Java 11 or greater."); if (javaVersion == null) { // don't think this will ever happen, but you never know System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version."); From d18513fb764326d005de1362e7280c04dee76ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:50:47 +0100 Subject: [PATCH 10/33] Downgrade upload-artifact action again v4 causes an error --- .github/workflows/renovate.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index e2bab10d..6c163a9d 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -22,7 +22,7 @@ jobs: RENOVATE_CONFIG_FILE: renovate.json RENOVATE_ENDPOINT: ${{ github.api_url }} RENOVATE_GIT_AUTHOR: Renovate Bot - #RENOVATE_GIT_IGNORED_AUTHORS: + #RENOVATE_GIT_IGNORED_AUTHORS: # - 29139614+renovate[bot]@users.noreply.github.com RENOVATE_IGNORE_PR_AUTHOR: 'true' RENOVATE_LOG_FILE: renovate-log.ndjson @@ -33,7 +33,8 @@ jobs: RENOVATE_TOKEN: ${{ secrets.renovate_token }} - name: Save log file - uses: actions/upload-artifact@v4 + # FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”) + uses: actions/upload-artifact@v3 with: name: renovate-log.ndjson path: renovate-log.ndjson From 6d355fc5bdc443f629c3fdc3998fbcd0d911b58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:55:49 +0100 Subject: [PATCH 11/33] Allow manual trigger of Renovate workflow --- .github/workflows/renovate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 6c163a9d..230c84e6 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -3,6 +3,7 @@ name: Run Renovate on: schedule: - cron: "13 * * * *" + workflow_dispatch: jobs: renovate: From 1341c241bdde482ddb64f4e853dbe506ca90d86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:58:31 +0100 Subject: [PATCH 12/33] Replace Renovate autodiscovery with explicitly setting the repository --- .github/workflows/renovate.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 230c84e6..64b55a82 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -19,7 +19,8 @@ jobs: GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} # See LOG_LEVEL: info # debug | info | warn | error | fatal - RENOVATE_AUTODISCOVER: 'true' + # Autodiscover is better suited for an extra repo running Renovate on all desired repos + #RENOVATE_AUTODISCOVER: 'true' RENOVATE_CONFIG_FILE: renovate.json RENOVATE_ENDPOINT: ${{ github.api_url }} RENOVATE_GIT_AUTHOR: Renovate Bot @@ -29,6 +30,7 @@ jobs: RENOVATE_LOG_FILE: renovate-log.ndjson RENOVATE_LOG_FILE_LEVEL: debug RENOVATE_PLATFORM: gitea + RENOVATE_REPOSITORIES: ${{ github.repository }} RENOVATE_REPOSITORY_CACHE: 'enabled' # github.token is not working here, it lacks some permissions required by Renovate RENOVATE_TOKEN: ${{ secrets.renovate_token }} From 0fc7d9134858e27223dd32fc82067996754561e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 16:06:15 +0100 Subject: [PATCH 13/33] Always save the Renovate log --- .github/workflows/renovate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 64b55a82..26dc20ad 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -38,6 +38,7 @@ jobs: - name: Save log file # FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”) uses: actions/upload-artifact@v3 + if: always() with: name: renovate-log.ndjson path: renovate-log.ndjson From f7add5ec47643ce626986bc37bfc80fd21a9a5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 16:20:01 +0100 Subject: [PATCH 14/33] Looks like setting the LOG_LEVEL variable in the env section does not work Setting it before the npx command does --- .github/workflows/renovate.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 26dc20ad..e470128c 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -13,12 +13,12 @@ jobs: - uses: actions/checkout@v4 - name: Run Renovate - run: npx renovate + # See + # debug | info | warn | error | fatal + run: LOG_LEVEL=info npx renovate env: # Renovate is using this token to retrieve release notes GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} - # See - LOG_LEVEL: info # debug | info | warn | error | fatal # Autodiscover is better suited for an extra repo running Renovate on all desired repos #RENOVATE_AUTODISCOVER: 'true' RENOVATE_CONFIG_FILE: renovate.json From e2e67cf2cc6ff984da7c62ef9c8b9a45c7cec32c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 27 Jan 2025 18:13:44 +0000 Subject: [PATCH 15/33] Update dependency commons-codec:commons-codec to v1.18.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index abf4287f..bcae67c6 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ configurations { dependencies { implementation 'com.google.code.gson:gson:2.11.0' - implementation 'commons-codec:commons-codec:1.17.1' + implementation 'commons-codec:commons-codec:1.18.0' implementation 'commons-fileupload:commons-fileupload:1.5' implementation 'commons-logging:commons-logging:1.3.4' implementation 'commons-net:commons-net:3.11.1' From dd9e4733104efcaad8ac8fa8e355db175a44f991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sun, 9 Feb 2025 13:23:21 +0100 Subject: [PATCH 16/33] Fix botched test of required Java version --- src/main/java/helma/main/Server.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/helma/main/Server.java b/src/main/java/helma/main/Server.java index 6155de3b..88d70db7 100644 --- a/src/main/java/helma/main/Server.java +++ b/src/main/java/helma/main/Server.java @@ -149,12 +149,13 @@ public class Server implements Runnable { * check if we are running on a Java 2 VM - otherwise exit with an error message */ public static void checkJavaVersion() { - String javaVersion = System.getProperty("java.version"); + String javaVersion = System.getProperty("java.version", "0"); + int majorVersion = Integer.parseInt(javaVersion.split("\\.")[0]); - if ((javaVersion == null) || !javaVersion.startsWith("11")) { + if (majorVersion < 11) { System.err.println("This version of Helma requires Java 11 or greater."); - if (javaVersion == null) { // don't think this will ever happen, but you never know + if (majorVersion == 0) { // don't think this will ever happen, but you never know System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version."); } else { System.err.println("Your Java Runtime is version " + javaVersion + From 45adacd5cddc89883eb895e8590195f6491a5cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 15 Feb 2025 15:25:13 +0100 Subject: [PATCH 17/33] Use name and URL of actual production environment --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cdad2c55..5acc94a2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,8 +7,8 @@ jobs: runs-on: antville environment: - name: weblogs.at - url: https://weblogs.at + name: antville.org + url: https://antville.org steps: - name: Copy files to production server From 156db3ee986efd324b3e50577ec9beafd1107b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 15 Feb 2025 15:25:36 +0100 Subject: [PATCH 18/33] Try Forgejo action to create a release --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b189f260..3716dddf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: Release on: + workflow_dispatch: push: tags: - 'v*' @@ -22,6 +23,15 @@ jobs: - name: Build with Gradle run: ./gradlew assembleDist + - uses: actions/forgejo-release@v2 + with: + direction: upload + url: https://code.host.antville.org + token: ${{ github.token }} + release-dir: build/distributions + release-notes-assistant: true + verbose: true + - name: Create release # FIXME: Currently only outputs gh command; adapt for Forgejo run: | From ff4b4b0f0794be5df0f7058a3f5b7063c83d7f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 15 Feb 2025 15:45:49 +0100 Subject: [PATCH 19/33] =?UTF-8?q?Set=20the=20release=20title=20to=20today?= =?UTF-8?q?=E2=80=99s=20date=20as=20formatted=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3716dddf..77e08fe3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,7 @@ name: Release on: workflow_dispatch: push: - tags: - - 'v*' + tags: '2*' permissions: contents: write @@ -16,6 +15,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} LC_TIME: en_US.UTF-8 + TODAY: $(date +'%d %b %Y') steps: - uses: actions/checkout@v4 @@ -28,6 +28,8 @@ jobs: direction: upload url: https://code.host.antville.org token: ${{ github.token }} + title: ${{ env.TODAY }} + #tag: $(date +'%Y.%m.%d') release-dir: build/distributions release-notes-assistant: true verbose: true From 70337bda407ddad9a28fb384953428ff0fed4e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 15 Feb 2025 15:46:07 +0100 Subject: [PATCH 20/33] Add a custom name for the release workflow --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77e08fe3..bbb377cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,8 @@ jobs: - name: Build with Gradle run: ./gradlew assembleDist - - uses: actions/forgejo-release@v2 + - name: Create release + uses: actions/forgejo-release@v2 with: direction: upload url: https://code.host.antville.org From 5bfcd0b6ea1f1147e79d385f44405a45707bac53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 15 Feb 2025 15:46:32 +0100 Subject: [PATCH 21/33] Distinguish the (currently bogus) GitHub release workflows by name --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bbb377cf..52994244 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: release-notes-assistant: true verbose: true - - name: Create release + - name: Create release at GitHub # FIXME: Currently only outputs gh command; adapt for Forgejo run: | echo gh release create "$GITHUB_REF_NAME" \ @@ -43,7 +43,7 @@ jobs: --title "$(date +'%d %b %Y')" \ --generate-notes - - name: Upload assets + - name: Upload release assets to GitHub # FIXME: Currently only outputs gh command; adapt for Forgejo run: | echo gh release upload "$GITHUB_REF_NAME" \ From 94557dd28e481893b5f948bc6d101dd011ef5b91 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 24 Jan 2025 13:14:06 +0000 Subject: [PATCH 22/33] Update dependency gradle to v8.12.1 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cea7a793..e18bc253 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From d1ead6e081fb589693c10a43f17ea421f09ab634 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 10 Jan 2025 19:17:53 +0000 Subject: [PATCH 23/33] Update Jetty packages to v9.4.57.v20241219 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index abf4287f..24fdde85 100644 --- a/build.gradle +++ b/build.gradle @@ -66,8 +66,8 @@ dependencies { implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'javax.servlet:javax.servlet-api:4.0.1' implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' - implementation 'org.eclipse.jetty:jetty-servlet:9.4.56.v20240826' - implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826' + implementation 'org.eclipse.jetty:jetty-servlet:9.4.57.v20241219' + implementation 'org.eclipse.jetty:jetty-xml:9.4.57.v20241219' implementation 'org.mozilla:rhino-all:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' From b1a14ad87baee8eaada5cdff88df59303175d49f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 8 Feb 2025 03:13:48 +0000 Subject: [PATCH 24/33] Update dependency commons-logging:commons-logging to v1.3.5 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 24fdde85..8a00b21c 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.11.0' implementation 'commons-codec:commons-codec:1.17.1' implementation 'commons-fileupload:commons-fileupload:1.5' - implementation 'commons-logging:commons-logging:1.3.4' + implementation 'commons-logging:commons-logging:1.3.5' implementation 'commons-net:commons-net:3.11.1' implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'javax.servlet:javax.servlet-api:4.0.1' From 6f6ea55b7b9220a698d29a167d330e42a2237f42 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 30 Jan 2025 23:13:45 +0000 Subject: [PATCH 25/33] Update dependency com.google.code.gson:gson to v2.12.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8a00b21c..8c71d733 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ configurations { } dependencies { - implementation 'com.google.code.gson:gson:2.11.0' + implementation 'com.google.code.gson:gson:2.12.1' implementation 'commons-codec:commons-codec:1.17.1' implementation 'commons-fileupload:commons-fileupload:1.5' implementation 'commons-logging:commons-logging:1.3.5' From 1bb5a093dadf0c371aa0f227094cbc2a04bf044d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 15 Feb 2025 19:07:37 +0100 Subject: [PATCH 26/33] Re-enable creating the release at Github after install of gh client --- .github/workflows/release.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52994244..f7aa7874 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: runs-on: antville env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} LC_TIME: en_US.UTF-8 TODAY: $(date +'%d %b %Y') @@ -30,22 +30,19 @@ jobs: url: https://code.host.antville.org token: ${{ github.token }} title: ${{ env.TODAY }} - #tag: $(date +'%Y.%m.%d') release-dir: build/distributions release-notes-assistant: true verbose: true - name: Create release at GitHub - # FIXME: Currently only outputs gh command; adapt for Forgejo run: | - echo gh release create "$GITHUB_REF_NAME" \ + gh release create "$GITHUB_REF_NAME" \ --repo "$GITHUB_REPOSITORY" \ - --title "$(date +'%d %b %Y')" \ + --title "${{ env.TODAY }}" \ --generate-notes - name: Upload release assets to GitHub - # FIXME: Currently only outputs gh command; adapt for Forgejo run: | - echo gh release upload "$GITHUB_REF_NAME" \ - build/distributions/helma-*.* \ + gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \ + --repo "$GITHUB_REPOSITORY" \ --clobber From 8212600d409eb6eb275ba7be09760299ab84cfa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 28 Feb 2025 21:42:33 +0100 Subject: [PATCH 27/33] Add deploy script usable with rsync and a restricted SSH key --- src/dist/extras/deploy.sh | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/dist/extras/deploy.sh diff --git a/src/dist/extras/deploy.sh b/src/dist/extras/deploy.sh new file mode 100644 index 00000000..6ebd6bf2 --- /dev/null +++ b/src/dist/extras/deploy.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Use this script as forced command of an authorized SSH key: +# command="/home/helma/extras/deploy.sh" ssh-ed25519 AAAAC3NzaC… + +# Define HELMA_HOST and ANTVILLE_HOST in this file +# shellcheck source=/dev/null +. "$HOME"/deploy.env + +case "$SSH_ORIGINAL_COMMAND" in + ping) + echo pong + ;; + + deploy-helma) + rsync ./ "$HELMA_HOST":./ \ + --archive --compress --delete --verbose \ + --filter '+ /bin' \ + --filter '+ /extras' \ + --filter '+ /launcher.jar' \ + --filter '- /lib/ext' \ + --filter '+ /lib' \ + --filter '+ /modules' \ + --filter '- /*' + printf 'Restarting Helma on HELMA_host… ' + ssh "$HELMA_HOST" sudo /bin/systemctl restart helma + ;; + + deploy-antville) + rsync ./apps/antville/ "$ANTVILLE_HOST":./apps/antville/ \ + --archive --compress --delete --verbose \ + --filter '+ /claustra' \ + --filter '+ /code' \ + --filter '+ /compat' \ + --filter '+ /i18n' \ + --filter '+ /lib' \ + --filter '- /*' + rsync ./apps/antville/static/helma/ "$ANTVILLE_HOST":./apps/antville/static/helma/ \ + --archive --compress --verbose \ + --filter '+ /fonts' \ + --filter '+ /formica.html' \ + --filter '+ /img' \ + --filter '+ /scripts' \ + --filter '+ /styles' \ + --filter '- /*' + printf 'Restarting Helma on ANTVILLE_host… ' + ssh "$ANTVILLE_HOST" sudo /bin/systemctl restart helma + ;; + + restart) + printf 'Restarting Helma… ' + sudo /bin/systemctl restart helma + printf '%s\n' 'done.' + ;; + + *) + # Allow any rsync command but restrict it to the installation directory + rrsync -wo /home/helma + ;; +esac From 3a8997ca5c1ca4633178e39233c66080483c8335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 28 Feb 2025 21:58:08 +0100 Subject: [PATCH 28/33] Initial commit --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..9bf8429b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build + +on: + push: + paths: + - build.gradle + - settings.gradle + - src/** + - launcher/build.gradle + - launcher/src/** + workflow_dispatch: + +jobs: + build: + runs-on: antville + + strategy: + matrix: + java: [11, 17, 21] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{ matrix.java }} + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Compile with Gradle + run: ./gradlew :compileJava From 84333d05cd78ed8f849fccf2f33e9f260e322751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 28 Feb 2025 22:04:48 +0100 Subject: [PATCH 29/33] Use fully qualified URL for setup-java action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bf8429b..18fde086 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v4 + uses: https://github.com/actions/setup-java@v4 with: distribution: temurin java-version: ${{ matrix.java }} From 2ff29317e57dce8688ea3d3546b623baa34d6446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 28 Feb 2025 22:09:55 +0100 Subject: [PATCH 30/33] Gradle is installed on the runner --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18fde086..846e2d6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,8 +27,5 @@ jobs: distribution: temurin java-version: ${{ matrix.java }} - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 - - name: Compile with Gradle run: ./gradlew :compileJava From 6ebdd6aa31e9900af80567faee2b007114b68944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 28 Feb 2025 22:12:30 +0100 Subject: [PATCH 31/33] Leave aside compiling for different Java versions for now --- .github/workflows/build.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 846e2d6f..47af9523 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,18 +14,8 @@ jobs: build: runs-on: antville - strategy: - matrix: - java: [11, 17, 21] - steps: - uses: actions/checkout@v4 - - name: Set up Java - uses: https://github.com/actions/setup-java@v4 - with: - distribution: temurin - java-version: ${{ matrix.java }} - - name: Compile with Gradle run: ./gradlew :compileJava From 808bc48ab948135234f301fb36daea04456f033a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 28 Feb 2025 22:13:25 +0100 Subject: [PATCH 32/33] Run the build workflow when itself has changed --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47af9523..69bcdeab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Build on: push: paths: + - .github/workflows/build.yml - build.gradle - settings.gradle - src/** From d9d3c9b863ac90b650a52e86d280f45e2e7b444e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sat, 1 Mar 2025 01:02:27 +0100 Subject: [PATCH 33/33] Add release notes generated with git-cliff --- .github/workflows/release.yml | 23 ++++++++++++---- cliff.toml | 52 +++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 cliff.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7aa7874..ac8a3d1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,16 +9,27 @@ permissions: contents: write jobs: - build: + release: runs-on: antville env: GH_TOKEN: ${{ secrets.GH_TOKEN }} LC_TIME: en_US.UTF-8 - TODAY: $(date +'%d %b %Y') steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create release notes + id: create_release_notes + run: | + release_notes=$(npx git-cliff@latest --latest) + # Write the release notes as a heredoc to the workflow output + # ⚠️ No white space around `<<` is crucial! + echo "release_notes<<.eot0x03" >> $GITHUB_OUTPUT + echo "$release_notes" >> $GITHUB_OUTPUT + echo ".eot0x03" >> $GITHUB_OUTPUT - name: Build with Gradle run: ./gradlew assembleDist @@ -29,17 +40,17 @@ jobs: direction: upload url: https://code.host.antville.org token: ${{ github.token }} - title: ${{ env.TODAY }} + title: Helma ${{ github.ref_name }} release-dir: build/distributions - release-notes-assistant: true + release-notes: ${{ steps.create_release_notes.outputs.release_notes }} verbose: true - name: Create release at GitHub run: | gh release create "$GITHUB_REF_NAME" \ --repo "$GITHUB_REPOSITORY" \ - --title "${{ env.TODAY }}" \ - --generate-notes + --title "Helma ${{ github.ref_name }}" \ + --notes "${{ steps.create_release_notes.outputs.release_notes }}" - name: Upload release assets to GitHub run: | diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 00000000..7832044a --- /dev/null +++ b/cliff.toml @@ -0,0 +1,52 @@ +# git-cliff ~ default configuration file +# https://git-cliff.org/docs/configuration +# +# Lines starting with "#" are comments. +# Configuration options are organized into tables and keys. +# See documentation for more information on available options. + +[changelog] +trim = true + +header = "## Changes" + +body = """ +{% for group, commits in commits | filter(attribute="merge_commit") | group_by(attribute="group") %} + ### {{ group | striptags | trim | upper_first }} + {% for commit in commits %} + * [{{ commit.id | split(pat="") | slice(end=11) | join() }}]\ + (https://code.host.antville.org/antville/helma/commit/{{ commit.id }}) \ + {% if commit.breaking %}**Breaking:** {% endif %}\ + {{ commit.message | split(pat="\\n") | first | upper_first }}\ + {% endfor %} +{% endfor %} + +**Full Changelog:** [{{ previous.version }} → {{ version }}]\ +(https://code.host.antville.org/antville/helma/compare/\ +{{ previous.version | urlencode }}..{{ version | urlencode }})\n\n +""" + +footer = """ +Generated by [git-cliff](https://git-cliff.org/). +""" + +[git] +conventional_commits = false +filter_commits = false +filter_unconventional = false +protect_breaking_commits = false +sort_commits = "newest" +split_commits = false +topo_order = false + +commit_parsers = [ + { message = "^Apply \\d+ suggestion", skip = true }, + { message = "^Merge .*(branch|dependabot|dependency|renovate)", skip = true }, + { message = "^Lock file maintenance", skip = true }, + { message = "yarn\\.lock", skip = true }, + + { message = "^[Ff]ix", group = " 🐛 Bug Fixes" }, + { field = "author.name", pattern = "[Rr]enovate|[Dd]ependabot", group = " 📦 Dependency Updates" }, + { message = "^Merge pull request", group = " 🔀 Merges" }, + { message = ".*", group = " Uncategorized" }, +]