Skip to content
Snippets Groups Projects
Unverified Commit a05e9680 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Fix bug where index.md is sometimes deleted (#1056)

parent 2b90cc9b
Branches
Tags
No related merge requests found
......@@ -124,11 +124,12 @@ task("generateSmithyBuild") {
}
}
task("generateDocs") {
task("generateIndexMd") {
inputs.property("servicelist", awsServices.services.toString())
outputs.file(outputDir.resolve("docs.md"))
val indexMd = outputDir.resolve("index.md")
outputs.file(indexMd)
doLast {
project.docsLandingPage(awsServices, outputDir)
project.docsLandingPage(awsServices, indexMd)
}
}
......@@ -268,7 +269,7 @@ task("finalizeSdk") {
"relocateRuntime",
"relocateAwsRuntime",
"relocateExamples",
"generateDocs",
"generateIndexMd",
"fixManifests"
)
}
......
......@@ -15,7 +15,7 @@ import java.io.File
* The generated docs will include links to crates.io, docs.rs and GitHub examples for all generated services. The generated docs will
* be written to `docs.md` in the provided [outputDir].
*/
fun Project.docsLandingPage(awsServices: AwsServices, outputDir: File) {
fun Project.docsLandingPage(awsServices: AwsServices, outputPath: File) {
val project = this
val writer = CodeWriter()
with(writer) {
......@@ -38,7 +38,7 @@ fun Project.docsLandingPage(awsServices: AwsServices, outputDir: File) {
)
}
}
outputDir.resolve("index.md").writeText(writer.toString())
outputPath.writeText(writer.toString())
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment