Compare commits

..

No commits in common. "f7add5ec47643ce626986bc37bfc80fd21a9a5d8" and "44f23757498a5f6c150e94a93f00edeed82fb1cc" have entirely different histories.

11 changed files with 57 additions and 71 deletions

View file

@ -4,12 +4,19 @@ on: workflow_dispatch
jobs: jobs:
deploy: deploy:
runs-on: antville runs-on: ubuntu-latest
environment: environment:
name: weblogs.at name: weblogs.at
url: https://weblogs.at url: https://weblogs.at
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

@ -10,7 +10,7 @@ permissions:
jobs: jobs:
build: build:
runs-on: antville runs-on: ubuntu-latest
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
@ -19,20 +19,27 @@ jobs:
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
# FIXME: Currently only outputs gh command; adapt for Forgejo
run: | run: |
echo gh release create "$GITHUB_REF_NAME" \ gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \ --repo "$GITHUB_REPOSITORY" \
--title "$(date +'%d %b %Y')" \ --title "$(date +'%d %b %Y')" \
--generate-notes --generate-notes
- name: Upload assets - name: Upload assets
# FIXME: Currently only outputs gh command; adapt for Forgejo
run: | run: |
echo gh release upload "$GITHUB_REF_NAME" \ gh release upload "$GITHUB_REF_NAME" \
build/distributions/helma-*.* \ build/distributions/helma-*.* \
--clobber --clobber

View file

@ -1,44 +0,0 @@
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,15 +4,31 @@ on: workflow_dispatch
jobs: jobs:
stage: stage:
runs-on: antville runs-on: ubuntu-latest
environment: environment:
name: stage name: stage
url: ${{ vars.stage_url }} url: https://antville-test.online
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.9' id 'com.github.jk1.dependency-license-report' version '2.7'
} }
import org.apache.tools.ant.filters.FixCrLfFilter import org.apache.tools.ant.filters.FixCrLfFilter
@ -59,16 +59,16 @@ configurations {
dependencies { dependencies {
implementation 'com.google.code.gson:gson:2.11.0' implementation 'com.google.code.gson:gson:2.11.0'
implementation 'commons-codec:commons-codec:1.17.1' implementation 'commons-codec:commons-codec:1.17.0'
implementation 'commons-fileupload:commons-fileupload:1.5' implementation 'commons-fileupload:commons-fileupload:1.5'
implementation 'commons-logging:commons-logging:1.3.4' implementation 'commons-logging:commons-logging:1.3.2'
implementation 'commons-net:commons-net:3.11.1' implementation 'commons-net:commons-net:3.10.0'
implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'com.sun.mail:javax.mail:1.6.2'
implementation 'javax.servlet:javax.servlet-api:4.0.1' implementation 'javax.servlet:javax.servlet-api:4.0.1'
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.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-servlet:9.4.54.v20240208'
implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826' implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208'
implementation 'org.mozilla:rhino-all:1.8.0' implementation 'org.mozilla:rhino:1.7.13'
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'
@ -172,7 +172,6 @@ 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.12-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

6
gradlew vendored
View file

@ -15,8 +15,6 @@
# 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
#
############################################################################## ##############################################################################
# #
@ -57,7 +55,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/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/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/.
@ -86,7 +84,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 -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || 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,8 +13,6 @@
@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 = /bin/sh -c 'touch apps.properties && touch server.properties' ExecReload = 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 = "__version__"; public static final String version = "🐜";
// build date // build date
public static final String buildDate = "__builddate__"; public static final String buildDate = "__builddate__";
@ -151,8 +151,13 @@ public class Server implements Runnable {
public static void checkJavaVersion() { public static void checkJavaVersion() {
String javaVersion = System.getProperty("java.version"); String javaVersion = System.getProperty("java.version");
if ((javaVersion == null) || !javaVersion.startsWith("11")) { if ((javaVersion == null) || javaVersion.startsWith("1.5")
System.err.println("This version of Helma requires Java 11 or greater."); || 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) { // don't think this will ever happen, but you never know 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."); System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version.");