pattern

fun pattern(regex: String): String

Creates a repo-relative regex pattern string for provenanceBuild { }. Unlike div, this does not validate for filesystem-illegal characters because the result is a regex pattern, not a concrete file path.

Example:

val sourceRepo by repos
provenanceBuild {
    include(
        sourceRepo.pattern("activities/aeb/ada/fusion_activity.cpp"),
        sourceRepo.pattern("lifecycle framework/communication/.+[.]cpp"),
    )
    exclude(
        sourceRepo.pattern(".*logging.*"),
        sourceRepo.pattern(".*tracing.*"),
    )
}

Return

the pattern string as-is (anchored to this repo's workspace)

Parameters

regex

workspace-relative regex pattern (forward-slash separated)