Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/adrs-included'
Browse files Browse the repository at this point in the history
  • Loading branch information
gernotstarke committed Jan 27, 2024
2 parents 8f5c255 + adc5424 commit 92b005e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
10 changes: 10 additions & 0 deletions build-arc-doku.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# convert markdown adrs to asciidoc
./dtcw exportMarkdown

# create a special include file which references all adrs
./dtcw specialCollectIncludes

# build the microsite
./dtcw generateSite
7 changes: 4 additions & 3 deletions docToolchainConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ taskInputsFiles = []
// Configuration for customTasks
// create a new Task with ./dtcw createTask
customTasks = [
'documentation/scripts/specialCollectIncludes.gradle',
/** customTasks **/
]

Expand Down Expand Up @@ -129,7 +130,7 @@ microsite.with {
// the menu of the microsite. A map of [code:'title'] entries to specify the order and title of the entries.
// the codes are autogenerated from the folder names or :jbake-menu: attribute entries from the .adoc file headers
// set a title to '-' in order to remove this menu entry.
menu = [adr: 'Tech Decisions (ADRs)']
menu = [adrs: '-']

//tag::additionalConverters[]
/**
Expand Down Expand Up @@ -486,9 +487,9 @@ collectIncludes.with {

fileFilter = "adoc" // define which files are considered. default: "ad|adoc|asciidoc"

minPrefixLength = "3" // define what minimum length the prefix. default: "3"
minPrefixLength = "0" // define what minimum length the prefix. default: "3"

maxPrefixLength = "3" // define what maximum length the prefix. default: ""
maxPrefixLength = "" // define what maximum length the prefix. default: ""

separatorChar = "_" // define the allowed separators after prefix. default: "-_"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Accepted.

* This is only valid if our service wasn't shutdown by our cloud provider between calls to our API.
If our current server is a "fresh instance", we have to ignore the last-time-called values.
*
* As we run in the cloud, we need to store the last-query-time for our external APIs in a persistent store (DB).


Expand Down
5 changes: 3 additions & 2 deletions documentation/arc42/chapters/09_architecture_decisions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
:filename: /chapters/09_architecture_decisions.adoc
ifndef::imagesdir[:imagesdir: ../../images]

:toclevels: 1
:toc:



[[section-design-decisions]]
== Architecture Decisions

ifndef::projectRootDir[:projectRootDir: ../../..]

include::{projectRootDir}/build/adrInclude.adoc[]

19 changes: 19 additions & 0 deletions documentation/scripts/specialCollectIncludes.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import static groovy.io.FileType.*

task specialCollectIncludes (
description: 'collects all ADR files as inlcude',
group: 'docToolchain'
) {
doLast {
println ("collect ADRs\n")
def adrFolder = new File (targetDir, "adrs")
println adrFolder.canonicalPath
def outFile = new File(targetDir,"adrInclude.adoc")
println ("write result to "+outFile.canonicalPath)
outFile.write("//autogenerated through ./dtcw specialCollectIncludes\n\n")
adrFolder.traverse(type: FILES) { file ->
print file.name+"\n"
outFile.append("include::adrs/${file.name}[leveloffset=+1]\n")
}
}
}

0 comments on commit 92b005e

Please sign in to comment.