Compare commits
No commits in common. "78d07cecce23a0007d419303436ad33209918adb" and "19259162209ddd8abe8ae009cc0e808570d09cac" have entirely different histories.
78d07cecce
...
1925916220
9 changed files with 31 additions and 30 deletions
10
.github/workflows/deploy.yml
vendored
10
.github/workflows/deploy.yml
vendored
|
@ -1,14 +1,18 @@
|
||||||
name: Deploy (Production)
|
name: Deploy (Production)
|
||||||
|
|
||||||
on: workflow_dispatch
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- helma-🐜
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
name: weblogs.at
|
name: p3k.org
|
||||||
url: https://weblogs.at
|
url: https://blog.p3k.org
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up SSH agent
|
- name: Set up SSH agent
|
||||||
|
|
2
.github/workflows/stage.yml
vendored
2
.github/workflows/stage.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
name: stage
|
name: stage
|
||||||
url: https://antville-test.online
|
url: https://antville-test.click
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
33
build.gradle
33
build.gradle
|
@ -17,10 +17,8 @@ def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties'
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
java {
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -157,26 +155,31 @@ installDist {
|
||||||
dependsOn build
|
dependsOn build
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('processSource', Sync) {
|
task processSource(type: Sync) {
|
||||||
|
def date = new Date().format("d MMMM yyyy")
|
||||||
def gitOutput = new ByteArrayOutputStream()
|
def gitOutput = new ByteArrayOutputStream()
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
commandLine 'git', 'describe'
|
||||||
standardOutput = gitOutput
|
standardOutput = gitOutput
|
||||||
errorOutput = new ByteArrayOutputStream()
|
errorOutput = new ByteArrayOutputStream()
|
||||||
ignoreExitValue = true
|
ignoreExitValue = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def description = date
|
||||||
|
def tag = gitOutput.toString().trim()
|
||||||
|
|
||||||
|
// TODO: Implement extended description in Java code
|
||||||
|
if (tag) description = "$tag; $description"
|
||||||
|
|
||||||
from 'src'
|
from 'src'
|
||||||
|
|
||||||
filter {
|
filter {
|
||||||
line -> line
|
line -> line.replaceAll('__builddate__', date)
|
||||||
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
|
|
||||||
.replaceAll('__commithash__', gitOutput.toString().trim())
|
|
||||||
} into "${project.buildDir}/src"
|
} into "${project.buildDir}/src"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('update') {
|
task update {
|
||||||
dependsOn installDist
|
dependsOn installDist
|
||||||
|
|
||||||
def rsyncArgs = ['--archive', '--filter', '- backups']
|
def rsyncArgs = ['--archive', '--filter', '- backups']
|
||||||
|
@ -222,7 +225,7 @@ tasks.register('update') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('jsdoc', Exec) {
|
task jsdoc(type: Exec) {
|
||||||
description 'Generates JSDoc API documentation for the included JavaScript modules.'
|
description 'Generates JSDoc API documentation for the included JavaScript modules.'
|
||||||
group 'Documentation'
|
group 'Documentation'
|
||||||
|
|
||||||
|
@ -236,7 +239,7 @@ tasks.register('jsdoc', Exec) {
|
||||||
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('xgettext', JavaExec) {
|
task xgettext(type: JavaExec) {
|
||||||
description 'Extracts translatable message strings from source code.'
|
description 'Extracts translatable message strings from source code.'
|
||||||
group 'i18n'
|
group 'i18n'
|
||||||
|
|
||||||
|
@ -253,7 +256,7 @@ tasks.register('xgettext', JavaExec) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('po2js', JavaExec) {
|
task po2js(type: JavaExec) {
|
||||||
description 'Converts translated message strings from PO format to JavaScript.'
|
description 'Converts translated message strings from PO format to JavaScript.'
|
||||||
group 'i18n'
|
group 'i18n'
|
||||||
|
|
||||||
|
@ -268,7 +271,7 @@ tasks.register('po2js', JavaExec) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('rhinoShell', JavaExec) {
|
task rhinoShell(type: JavaExec) {
|
||||||
description 'Runs the interactive Rhino JavaScript shell.'
|
description 'Runs the interactive Rhino JavaScript shell.'
|
||||||
group 'Application'
|
group 'Application'
|
||||||
|
|
||||||
|
@ -280,7 +283,7 @@ tasks.register('rhinoShell', JavaExec) {
|
||||||
|
|
||||||
// Call this task with a function definition using the `-P` parameter, e.g.
|
// Call this task with a function definition using the `-P` parameter, e.g.
|
||||||
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
|
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
|
||||||
tasks.register('commandLine', JavaExec) {
|
task commandLine(type: JavaExec) {
|
||||||
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
|
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
|
||||||
group 'Application'
|
group 'Application'
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
tasks.register('deps', Copy) {
|
task deps(type: Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into '.'
|
into '.'
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
tasks.register('deps', Copy) {
|
task deps(type: Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into 'lib'
|
into 'lib'
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
tasks.register('deps', Copy) {
|
task deps(type: Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into 'lib'
|
into 'lib'
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
tasks.register('deps', Copy) {
|
task deps(type: Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into 'code'
|
into 'code'
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,13 +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 = "🐜 (__builddate__)";
|
||||||
|
|
||||||
// build date
|
|
||||||
public static final String buildDate = "__builddate__";
|
|
||||||
|
|
||||||
// commit hash
|
|
||||||
public static final String commitHash = "__commithash__";
|
|
||||||
|
|
||||||
// static server instance
|
// static server instance
|
||||||
private static Server server;
|
private static Server server;
|
||||||
|
|
Loading…
Add table
Reference in a new issue