Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2024-2025 3A Systems LLC.
* Copyright 2024-2026 3A Systems LLC.
*/

package org.openidentityplatform.doc.maven;
Expand Down Expand Up @@ -126,10 +126,11 @@ protected void setVersion(String version) throws IOException {
for(File docFile : docDir.listFiles((dir, name) -> name.toLowerCase().endsWith(".adoc"))) {
System.out.println(docFile);
String adoc = FileUtils.readFileToString(docFile, StandardCharsets.UTF_8);

String versionRegex = String.format("(:%s-version:)\\s*(.*)\\b", this.projectName.toLowerCase());
adoc = adoc.replaceAll(versionRegex, "$1 " + version);

String versionShortRegex = String.format("(:%s-version-short:)\\s*(.*)\\b", this.projectName);
String versionShortRegex = String.format("(:%s-version-short:)\\s*(.*)\\b", this.projectName.toLowerCase());
adoc = adoc.replaceAll(versionShortRegex, "$1 " + versionShort);

FileUtils.writeStringToFile(docFile, adoc, StandardCharsets.UTF_8);
Expand Down