Compare commits

..

47 commits

Author SHA1 Message Date
cd8baa4ac1
Merge branch 'main' into renovate/major-jetty-packages 2025-02-15 20:43:32 +01:00
1bb5a093da
Re-enable creating the release at Github after install of gh client
All checks were successful
Release / build (push) Successful in 26s
2025-02-15 19:49:13 +01:00
2c6dd96cd7
Merge branch 'main' into renovate/commons-codec-commons-codec-1.x 2025-02-15 18:39:26 +01:00
6f6ea55b7b Update dependency com.google.code.gson:gson to v2.12.1 2025-02-15 17:36:51 +00:00
b1a14ad87b Update dependency commons-logging:commons-logging to v1.3.5 2025-02-15 17:36:40 +00:00
d1ead6e081 Update Jetty packages to v9.4.57.v20241219 2025-02-15 17:36:29 +00:00
94557dd28e Update dependency gradle to v8.12.1 2025-02-15 17:35:46 +00:00
5bfcd0b6ea
Distinguish the (currently bogus) GitHub release workflows by name
All checks were successful
Release / build (push) Successful in 26s
2025-02-15 16:43:05 +01:00
70337bda40
Add a custom name for the release workflow 2025-02-15 16:43:05 +01:00
ff4b4b0f07
Set the release title to today’s date as formatted string 2025-02-15 16:43:05 +01:00
156db3ee98
Try Forgejo action to create a release 2025-02-15 15:25:36 +01:00
45adacd5cd
Use name and URL of actual production environment 2025-02-15 15:25:13 +01:00
dd9e473310
Fix botched test of required Java version 2025-02-09 13:23:21 +01:00
e2e67cf2cc Update dependency commons-codec:commons-codec to v1.18.0 2025-01-27 18:13:44 +00:00
f7add5ec47
Looks like setting the LOG_LEVEL variable in the env section does not work
Setting it before the npx command does
2025-01-03 16:20:01 +01:00
0fc7d91348
Always save the Renovate log 2025-01-03 16:16:27 +01:00
1341c241bd
Replace Renovate autodiscovery with explicitly setting the repository 2025-01-03 16:16:27 +01:00
6d355fc5bd
Allow manual trigger of Renovate workflow 2025-01-03 15:55:49 +01:00
d18513fb76
Downgrade upload-artifact action again
v4 causes an error
2025-01-03 15:55:09 +01:00
d10f8d6d90
Replace elaborate checks for Java version with single one for Java 11 2025-01-03 15:54:42 +01:00
66fa98353e
Add the actual version string to helma.main.Server again 2025-01-03 15:54:42 +01:00
c2b37a8243
Update workflows for Forgejo runner 2025-01-03 13:35:33 +01:00
0c9b00dbb1 Merge pull request 'Update actions/upload-artifact action to v4' (#122) from renovate/major-github-artifact-actions into helma-🐜
Reviewed-on: #122
2025-01-03 12:01:15 +00:00
c1e9371f6b Update .github/workflows/renovate.yml 2025-01-03 11:59:50 +00:00
3284a1ca19 Update actions/upload-artifact action to v4 2025-01-03 11:57:30 +00:00
cbb6599ce0 Add Renovate workflow 2025-01-03 11:46:46 +00:00
49c1be97bb
Merge pull request #75 from antville/renovate/org.mozilla-rhino-1.x
Update dependency org.mozilla:rhino to v1.8.0
2025-01-03 11:08:53 +01:00
31bdcc6c27
Merge remote-tracking branch 'origin/renovate/org.mozilla-rhino-1.x' into renovate/org.mozilla-rhino-1.x 2025-01-03 11:01:24 +01:00
bdd4f7e280
Merge remote-tracking branch 'origin/helma-🐜' into helma-🐜 2025-01-03 10:49:14 +01:00
154a4a916a
Merge pull request #117 from antville/renovate/gradle-8.x
Update dependency gradle to v8.12
2025-01-03 10:44:22 +01:00
renovate[bot]
28887aaccd
Update dependency org.mozilla:rhino to v1.8.0 2025-01-03 09:32:00 +00:00
a00e2f730a
Merge pull request #118 from antville/renovate/jetty-packages
Update Jetty packages to v9.4.56.v20240826
2025-01-03 10:31:18 +01:00
9c2c603d4a
Merge pull request #110 from antville/renovate/com.github.jk1.dependency-license-report-2.x
Update plugin com.github.jk1.dependency-license-report to v2.9
2025-01-03 10:24:46 +01:00
b0260259ea
Merge pull request #111 from antville/renovate/commons-net-commons-net-3.x
Update dependency commons-net:commons-net to v3.11.1
2025-01-03 10:18:45 +01:00
renovate[bot]
d3098c892f
Update dependency commons-net:commons-net to v3.11.1 2025-01-03 09:12:13 +00:00
a5fa58dc3d
Merge pull request #119 from antville/renovate/commons-logging-commons-logging-1.x
Update dependency commons-logging:commons-logging to v1.3.4
2025-01-03 10:11:30 +01:00
20ea2a8fb9
Merge pull request #120 from antville/renovate/commons-codec-commons-codec-1.x
Update dependency commons-codec:commons-codec to v1.17.1
2025-01-03 10:09:28 +01:00
de34e49fc0
Merge pull request #121 from antville/renovate/gradle-actions-4.x
Update gradle/actions action to v4
2025-01-03 10:03:26 +01:00
f7fe09a294
Switch to rhino-all.jar, Helma needs the full Rhino experience 2025-01-03 09:53:53 +01:00
renovate[bot]
4ebbcb01ae
Update dependency org.mozilla:rhino to v1.8.0 2025-01-03 08:07:29 +00:00
renovate[bot]
e93c501149
Update dependency gradle to v8.12 2024-12-20 17:56:06 +00:00
renovate[bot]
3809198380
Update Jetty packages to v9.4.56.v20240826 2024-09-03 19:04:35 +00:00
renovate[bot]
65ac2df0ba
Update dependency commons-logging:commons-logging to v1.3.4 2024-08-19 14:24:50 +00:00
renovate[bot]
12e7f298ad
Update plugin com.github.jk1.dependency-license-report to v2.9 2024-08-15 18:27:04 +00:00
3365a2ef58
Fix ExecReload setting in service configuration 2024-08-08 23:00:08 +02:00
renovate[bot]
a975930192
Update gradle/actions action to v4 2024-08-03 22:55:47 +00:00
renovate[bot]
a54b27c4aa
Update dependency commons-codec:commons-codec to v1.17.1 2024-07-16 02:34:32 +00:00
11 changed files with 90 additions and 65 deletions

View file

@ -4,19 +4,12 @@ on: workflow_dispatch
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: antville
environment: environment:
name: weblogs.at name: antville.org
url: https://weblogs.at url: https://antville.org
steps: 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 - name: Copy files to production server
run: ssh staging-server deploy-helma run: ssh staging-server deploy-helma

View file

@ -1,45 +1,48 @@
name: Release name: Release
on: on:
workflow_dispatch:
push: push:
tags: tags: '2*'
- 'v*'
permissions: permissions:
contents: write contents: write
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: antville
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
LC_TIME: en_US.UTF-8 LC_TIME: en_US.UTF-8
TODAY: $(date +'%d %b %Y')
steps: steps:
- uses: actions/checkout@v4 - 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@v3
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew assembleDist run: ./gradlew assembleDist
- name: Create release - name: Create release
uses: actions/forgejo-release@v2
with:
direction: upload
url: https://code.host.antville.org
token: ${{ github.token }}
title: ${{ env.TODAY }}
release-dir: build/distributions
release-notes-assistant: true
verbose: true
- name: Create release at GitHub
run: | run: |
gh release create "$GITHUB_REF_NAME" \ gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \ --repo "$GITHUB_REPOSITORY" \
--title "$(date +'%d %b %Y')" \ --title "${{ env.TODAY }}" \
--generate-notes --generate-notes
- name: Upload assets - name: Upload release assets to GitHub
run: | run: |
gh release upload "$GITHUB_REF_NAME" \ gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \
build/distributions/helma-*.* \ --repo "$GITHUB_REPOSITORY" \
--clobber --clobber

44
.github/workflows/renovate.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: Run Renovate
on:
schedule:
- cron: "13 * * * *"
workflow_dispatch:
jobs:
renovate:
runs-on: antville
steps:
- uses: actions/checkout@v4
- name: Run Renovate
# See <https://docs.renovatebot.com/troubleshooting/#log-debug-levels>
# 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 }}
# 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 <mail+renovate@antville.org>
#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_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 }}
- 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

View file

@ -4,31 +4,15 @@ on: workflow_dispatch
jobs: jobs:
stage: stage:
runs-on: ubuntu-latest runs-on: antville
environment: environment:
name: stage name: stage
url: https://antville-test.online url: ${{ vars.stage_url }}
steps: steps:
- uses: actions/checkout@v4 - 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@v3
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew installDist run: ./gradlew installDist

View file

@ -1,6 +1,6 @@
plugins { plugins {
id 'application' id 'application'
id 'com.github.jk1.dependency-license-report' version '2.7' id 'com.github.jk1.dependency-license-report' version '2.9'
} }
import org.apache.tools.ant.filters.FixCrLfFilter import org.apache.tools.ant.filters.FixCrLfFilter
@ -58,18 +58,18 @@ configurations {
} }
dependencies { 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.0' implementation 'commons-codec:commons-codec:1.18.0'
implementation 'org.apache.commons:commons-fileupload2-core:2.0.0-M2' implementation 'org.apache.commons:commons-fileupload2-core:2.0.0-M2'
implementation 'org.apache.commons:commons-fileupload2-jakarta:2.0.0-M1' implementation 'org.apache.commons:commons-fileupload2-jakarta:2.0.0-M1'
implementation 'commons-logging:commons-logging:1.3.2' implementation 'commons-logging:commons-logging:1.3.5'
implementation 'commons-net:commons-net:3.10.0' implementation 'commons-net:commons-net:3.11.1'
implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'com.sun.mail:javax.mail:1.6.2'
implementation 'jakarta.servlet:jakarta.servlet-api:5.0.0' implementation 'jakarta.servlet:jakarta.servlet-api:5.0.0'
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
implementation 'org.eclipse.jetty.ee9:jetty-ee9-servlet:12.0.9' implementation 'org.eclipse.jetty.ee9:jetty-ee9-servlet:12.0.9'
implementation 'org.eclipse.jetty:jetty-xml:12.0.9' implementation 'org.eclipse.jetty:jetty-xml:12.0.9'
implementation 'org.mozilla:rhino:1.7.13' implementation 'org.mozilla:rhino-all:1.8.0'
implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'org.sejda.imageio:webp-imageio:0.1.6'
implementation 'xerces:xercesImpl:2.12.2' implementation 'xerces:xercesImpl:2.12.2'
implementation 'xmlrpc:xmlrpc:2.0.1' implementation 'xmlrpc:xmlrpc:2.0.1'
@ -173,6 +173,7 @@ tasks.register('processSource', Sync) {
line -> line line -> line
.replaceAll('__builddate__', new Date().format("d MMM yyyy")) .replaceAll('__builddate__', new Date().format("d MMM yyyy"))
.replaceAll('__commithash__', gitOutput.toString().trim()) .replaceAll('__commithash__', gitOutput.toString().trim())
.replaceAll('__version__', version)
} into "${project.buildDir}/src" } into "${project.buildDir}/src"
} }

Binary file not shown.

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

6
gradlew vendored
View file

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

2
gradlew.bat vendored
View file

@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################

View file

@ -18,7 +18,7 @@ ExecStart = /usr/bin/java -server \
-jar launcher.jar \ -jar launcher.jar \
-w 8080 -x 8081 -w 8080 -x 8081
ExecReload = touch apps.properties && touch server.properties ExecReload = /bin/sh -c 'touch apps.properties && touch server.properties'
ExecStop = /bin/kill -15 $MAINPID ExecStop = /bin/kill -15 $MAINPID
[Install] [Install]

View file

@ -36,7 +36,7 @@ import helma.util.ResourceProperties;
*/ */
public class Server implements Runnable { public class Server implements Runnable {
// version string // version string
public static final String version = "🐜"; public static final String version = "__version__";
// build date // build date
public static final String buildDate = "__builddate__"; public static final String buildDate = "__builddate__";
@ -149,17 +149,13 @@ public class Server implements Runnable {
* check if we are running on a Java 2 VM - otherwise exit with an error message * check if we are running on a Java 2 VM - otherwise exit with an error message
*/ */
public static void checkJavaVersion() { 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("1.5") if (majorVersion < 11) {
|| javaVersion.startsWith("1.4") System.err.println("This version of Helma requires Java 11 or greater.");
|| 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) { // 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."); System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version.");
} else { } else {
System.err.println("Your Java Runtime is version " + javaVersion + System.err.println("Your Java Runtime is version " + javaVersion +