Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from jbake-org:master #26

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
aa11e29
Fix data files being referenced from Pebble templates.
jonbullock Dec 22, 2021
89c022b
Manually merged #737
jonbullock Jan 3, 2022
1a4499c
Merge remote-tracking branch 'upstream/master' into merge/configure-j…
jonbullock Jan 3, 2022
e4aa9a8
Added generation of HelpMojo.
jonbullock Jan 5, 2022
6b200da
Use blocking method rather than the throwing one
pzygielo Jan 5, 2022
039d6fa
Removed github-release plugin, replaced with JReleaser.
jonbullock Jan 5, 2022
9afb552
Moved all plugin versions into gradle.properties
jonbullock Jan 5, 2022
7f594f4
Merge pull request #742 from jonbullock/merge/configure-jreleaser-737
jonbullock Jan 5, 2022
7343470
Merge pull request #736 from jonbullock/fix/pebble-data-files
jonbullock Mar 3, 2022
7a38eed
Updated secret reference.
jonbullock Mar 6, 2022
1d97619
Added SDKMAN secrets.
jonbullock Mar 7, 2022
ccd29ad
Reverted to SNAPSHOT suffix.
jonbullock Mar 7, 2022
6e2a495
Added transform to JReleaser based artifacts.
jonbullock Mar 7, 2022
ac58d7e
Merge pull request #744 from pzygielo/queue
jonbullock Mar 10, 2022
8f7b8be
Change DuplicatesStrategy from EXCLUDE to INHERIT
georgecao Mar 18, 2022
ffbc0c9
Change DuplicatesStrategy from EXCLUDE to INCLUDE
georgecao Mar 18, 2022
06e4c0d
Fixes #747
jonbullock Mar 20, 2022
fe75f07
As adoptopenjdk is deprecated the dependencies should be adopted to i…
areyouready Mar 24, 2022
8113dac
Merge pull request #758 from areyouready/Docker_Run_JRE_Change
jonbullock Mar 24, 2022
973204e
Stops the duplication and the need for a strategy at all.
georgecao Mar 29, 2022
4d5cd56
Merge pull request #756 from georgecao/ds
jonbullock Mar 31, 2022
3fdfd65
Regression test for fix.
jonbullock Apr 3, 2022
2e5a20b
Merge pull request #757 from jonbullock/fix/747-orientdb-otrackedmap
jonbullock May 30, 2022
7505683
Fixes #709
jonbullock Sep 18, 2022
563be75
Resolved issue when getting tags back for content, following OrientDB…
jonbullock Sep 19, 2022
e1fae71
Included file encoding parameter to cover execution on Windows.
jonbullock Sep 19, 2022
857cf2e
Used runner context to detect OS build is running on.
jonbullock Sep 19, 2022
7aeb4c6
Altered shell for Windows.
jonbullock Sep 19, 2022
3064f1c
Merge pull request #765 from jonbullock/fix/709-apple-silicon
jonbullock Sep 19, 2022
4db36fe
Update version to 2.7.0-rc.6
jonbullock Sep 20, 2022
5b1163e
Merge pull request #766 from jonbullock/release-2.7.0-rc.6
jonbullock Sep 20, 2022
8341bd1
Fixed signing for publishing to Maven Central.
jonbullock Sep 21, 2022
38ed80d
Merge pull request #768 from jonbullock/fix/maven-central-signing
jonbullock Sep 21, 2022
701f9dc
Upgrade AsciidoctorJ to version 2.5.7
jmp Nov 8, 2022
f7aa575
Merge pull request #771 from jmp/upgrade-asciidoctorj-to-v2.5.7
jonbullock Feb 20, 2023
ee903ba
Reverted to SNAPSHOT suffix.
jonbullock Feb 25, 2023
9a24627
Fix openjdk11 build on Travis.
jonbullock Feb 25, 2023
00bc276
Still trying to get openjdk11 working on OSX.
jonbullock Feb 25, 2023
8a8101a
Removed MacOS build with openjdk11 for time being.
jonbullock Feb 25, 2023
c4ab637
Bumped version for next RC.
jonbullock Feb 26, 2023
5921ee5
Reverted to SNAPSHOT suffix.
jonbullock Feb 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on:
pull_request:

jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Build-win
if: runner.os == 'Windows'
shell: cmd
run: gradlew.bat -Dfile.encoding=UTF-8 build -S
- name: Build-nix
if: runner.os != 'Windows'
run: ./gradlew build -S

- name: Upload Reports
uses: actions/upload-artifact@v1
if: failure()
with:
name: reports-${{ runner.os }}
path: |
jbake-core/build
jbake-dist/build
57 changes: 57 additions & 0 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: EarlyAccess

on:
push:
branches: [ master ]

jobs:
earlyaccess:
name: EarlyAccess
if: github.repository == 'jbake-org/jbake'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Build
run: ./gradlew build -S

- name: Release
run: ./gradlew jreleaserRelease -S
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
JRELEASER_SDKMAN_CONSUMER_KEY: ${{ secrets.SDKMAN_CONSUMER_KEY }}
JRELEASER_SDKMAN_CONSUMER_TOKEN: ${{ secrets.SDKMAN_CONSUMER_TOKEN }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
with:
name: jreleaser-logs
path: |
jbake-dist/build/jreleaser/trace.log
jbake-dist/build/jreleaser/output.properties
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
- jdk: openjdk11

- os: osx
osx_image: xcode13.2
osx_image: xcode13.2 # defaults to openjdk17

- jdk: openjdk11
os: osx
# below config fails
# - os: osx
# osx_image: xcode9.4
# jdk: openjdk11

# - stage: Quality Check
# name: sonarqube
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN set -o errexit -o nounset \
&& cp -r jbake-dist/build/install/jbake/* $JBAKE_HOME \
&& rm -r ~/.gradle /usr/src/jbake

FROM adoptopenjdk/openjdk11:alpine-jre
FROM eclipse-temurin:11-jre-alpine

ENV JBAKE_USER=jbake
ENV JBAKE_HOME=/opt/jbake
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "io.github.gradle-nexus.publish-plugin" version "$nexusPublishPluginVersion"
id 'com.github.ben-manes.versions' version "$versionsPluginVersion"
id 'org.ajoberstar.grgit' version "$grgitVersion"
id 'org.jreleaser' version "$jreleaserVersion" apply false
id "eclipse"
id "idea"
}
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
group = org.jbake
version = 2.7.0-rc.5
version = 2.7.0-SNAPSHOT
description = JBake is a Java based open source static site/blog generator for developers.

website = http://jbake.org
issues = https://github.com/jbake-org/jbake/issues
vcs = https://github.com/jbake-org/jbake/

# runtime dependencies
asciidoctorjVersion = 2.5.2
asciidoctorjVersion = 2.5.7
asciidoctorjDiagramVersion = 2.2.1
args4jVersion = 2.33
commonsIoVersion = 2.11.0
Expand All @@ -24,7 +24,7 @@ jade4jVersion = 1.3.2
jsoupVersion = 1.14.3
jgitVersion = 6.0.0.202111291000-r
logbackVersion = 1.2.10
orientDbVersion = 3.0.41
orientDbVersion = 3.1.20
pebbleVersion = 3.1.5
slf4jVersion = 1.7.32
snakeYamlVersion = 1.30
Expand All @@ -45,9 +45,9 @@ jacocoVersion = 0.8.7
grgitVersion = 4.1.1
nexusPublishPluginVersion = 1.1.0
versionsPluginVersion = 0.40.0
sdkmanVersion = 3.0.0
githubReleaseVersion = 2.2.12
optionalBaseVersion = 7.0.0
jreleaserVersion = 0.10.0
mavenPluginDevVersion = 0.3.1

# jbake-maven-plugin dependencies
mavenVersion = 3.8.4
Expand Down
35 changes: 0 additions & 35 deletions gradle/github-releases.gradle

This file was deleted.

60 changes: 60 additions & 0 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'org.jreleaser'

// cannot reference project. properties inside jreleaser config block
// as that collides with the "project" DSL element of the config extension
ext.releaseIsDryrun = (project.rootProject.findProperty('dryrun') ?: false).toBoolean()
ext.projectWebsite = project.website

jreleaser {
dryrun = releaseIsDryrun
gitRootSearch = true

project {
website = projectWebsite
authors = ['Jonathan Bullock']
license = 'MIT'
extraProperties.put('inceptionYear', '2012')
}

release {
github {
overwrite = true
branch = 'master'
changelog {
formatted = 'always'
format = '- {{commitShortHash}} {{commitTitle}}'
contributors {
format = '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'
}
hide {
contributors = ['GitHub']
}
}
}
}

signing {
active = 'always'
armored = true
}

checksum {
individual = true
}

distributions {
jbake {
sdkman {
active = 'release'
}
artifact {
path = 'build/distributions/{{distributionName}}-{{projectVersion}}-bin.zip'
transform = '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}-bin.zip'
}
artifact {
path = 'build/distributions/{{distributionName}}-{{projectVersion}}.tar'
transform = '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.tar'
}
}
}
}
32 changes: 0 additions & 32 deletions gradle/sdkman.gradle

This file was deleted.

5 changes: 0 additions & 5 deletions gradle/signing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,5 @@ if ( !project.hasProperty('skipSigning') ) {
sign publishing.publications.mavenJava
}
}
else {
signing {
sign configurations.archives
}
}
}
}
8 changes: 3 additions & 5 deletions jbake-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ dependencies {
}

processResources {
from("src/main/resources") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
include 'default.properties'
filesMatching("default.properties") {
expand jbakeVersion: project.version,
timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")),
gitHash: grgit.head().abbreviatedId
timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")),
gitHash: grgit.head().abbreviatedId
}
}
10 changes: 4 additions & 6 deletions jbake-core/src/main/java/org/jbake/app/ContentStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OSchema;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.record.OElement;
import com.orientechnologies.orient.core.sql.executor.OResultSet;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;
import org.jbake.launcher.SystemExit;
import org.jbake.model.DocumentModel;
import org.jbake.model.DocumentTypes;
import org.jbake.model.ModelAttributes;
Expand Down Expand Up @@ -408,9 +406,9 @@ public boolean isActive() {
}

public void addDocument(DocumentModel document) {
ODocument doc = new ODocument(Schema.DOCUMENTS);
doc.fromMap(document);
doc.save();
OElement element = db.newElement(Schema.DOCUMENTS);
document.forEach((k, v) -> element.setProperty(k, v, OType.ANY));
element.save();
}

protected abstract class Schema {
Expand Down
5 changes: 5 additions & 0 deletions jbake-core/src/main/java/org/jbake/app/DBUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.jbake.app.configuration.JBakeConfiguration;
import org.jbake.model.DocumentModel;

import java.util.ArrayList;

public class DBUtil {
private static ContentStore contentStore;

Expand Down Expand Up @@ -56,6 +58,9 @@ public static String[] toStringArray(Object entry) {
} else if (entry instanceof OTrackedList) {
OTrackedList<String> list = (OTrackedList<String>) entry;
return list.toArray(new String[list.size()]);
} else if (entry instanceof ArrayList) {
ArrayList<String> list = (ArrayList<String>) entry;
return list.toArray(new String[list.size()]);
}
return new String[0];
}
Expand Down
Loading