Skip to content

Commit

Permalink
Remove SNAPSHOT from validation path for docs (#1657)
Browse files Browse the repository at this point in the history
Motivation:
When validating local docs validate everything but only validate
the current SNAPSHOT when validating remote docs. Remote docs
likely include legacy docs which will fail validation but cannot
be updated.
Modifications:
HTML files path is now customized based on validation location.
Result:
Cleaner, narrower validation.
  • Loading branch information
bondolo committed Jul 6, 2021
1 parent af1f67d commit d697674
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/generation/gradle/validateSite.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ for (location in ["local", "remote"]) {
def configureValidateHtmlFilesTask = "configureValidate${capitalizedLocation}HtmlFiles"
def validateHtmlLinksTask = "validate${capitalizedLocation}HtmlLinks"

def htmlFiles = fileTree("$buildDir/$location").matching { include "**/SNAPSHOT/*.html" }
def htmlFiles
if (location == "local") {
htmlFiles = fileTree("$buildDir/$location").matching {
include "**/*.html"
}
} else {
// only check the currently generated docs, ignore legacy docs
htmlFiles = fileTree("$buildDir/$location").matching {
include "**/SNAPSHOT/*.html"
}
}

task(validateSiteTask) {
dependsOn validateHtmlFilesTask, validateHtmlLinksTask
Expand Down

0 comments on commit d697674

Please sign in to comment.