Compare commits
18 commits
Author | SHA1 | Date | |
---|---|---|---|
cb07313509 | |||
f7add5ec47 | |||
0fc7d91348 | |||
1341c241bd | |||
6d355fc5bd | |||
d18513fb76 | |||
d10f8d6d90 | |||
66fa98353e | |||
c2b37a8243 | |||
0c9b00dbb1 | |||
c1e9371f6b | |||
3284a1ca19 | |||
cbb6599ce0 | |||
49c1be97bb | |||
31bdcc6c27 | |||
|
28887aaccd | ||
f7fe09a294 | |||
|
4ebbcb01ae |
6 changed files with 53 additions and 47 deletions
9
.github/workflows/deploy.yml
vendored
9
.github/workflows/deploy.yml
vendored
|
@ -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
|
||||
|
|
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
@ -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
|
||||
|
|
40
.github/workflows/renovate.yml
vendored
Normal file
40
.github/workflows/renovate.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
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_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
|
20
.github/workflows/stage.yml
vendored
20
.github/workflows/stage.yml
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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-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'
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
|
@ -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__";
|
||||
|
@ -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.");
|
||||
|
|
Loading…
Add table
Reference in a new issue