release-0.11.0

This commit is contained in:
ansgarz 2022-04-18 18:47:22 +02:00
parent efe158275b
commit 478ea014f5
3 changed files with 10 additions and 15 deletions

View file

@ -18,7 +18,7 @@ apply plugin: "kotlinx-serialization"
group = "org.domaindrivenarchitecture.provs" group = "org.domaindrivenarchitecture.provs"
version = "0.10.2-SNAPSHOT" version = "release-0.11.0"
repositories { repositories {
mavenCentral() mavenCentral()

View file

@ -55,7 +55,7 @@ fun Prov.createFileFromResourceTemplate(
): ProvResult = task { ): ProvResult = task {
createFile( createFile(
fullyQualifiedFilename, fullyQualifiedFilename,
getResourceAsText(resourcePath.endingWithFileSeparator() + resourceFilename).resolve(values), getResourceResolved(resourcePath.endingWithFileSeparator() + resourceFilename, values),
posixFilePermission, posixFilePermission,
sudo sudo
) )

View file

@ -12,19 +12,14 @@ import java.util.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
fun Prov.verifySpecConfig(conf: SyspecConfig) = task { fun Prov.verifySpecConfig(conf: SyspecConfig) = task {
// required to guarantee that at least one result can be provided conf.command?.let { task("CommandSpecs") { for (spec in conf.command) verify(spec) } }
val dummySuccess = ProvResult(true) conf.file?.let { task("FileSpecs") { for (spec in conf.file) verify(spec) } }
conf.folder?.let { task("FolderSpecs") { for (spec in conf.folder) verify(spec) } }
conf.command?.let { task("CommandSpecs") { for (spec in conf.command) verify(spec); dummySuccess } } conf.host?.let { task("HostSpecs") { for (spec in conf.host) verify(spec) } }
conf.file?.let { task("FileSpecs") { for (spec in conf.file) verify(spec); dummySuccess } } conf.`package`?.let { task("PackageSpecs") { for (spec in conf.`package`) verify(spec) } }
conf.folder?.let { task("FolderSpecs") { for (spec in conf.folder) verify(spec); dummySuccess } } conf.netcat?.let { task("NetcatSpecs") { for (spec in conf.netcat) verify(spec) } }
conf.host?.let { task("HostSpecs") { for (spec in conf.host) verify(spec); dummySuccess } } conf.socket?.let { task("SocketSpecs") { for (spec in conf.socket) verify(spec) } }
conf.`package`?.let { task("PackageSpecs") { for (spec in conf.`package`) verify(spec); dummySuccess } } conf.certificate?.let { task("CertificateFileSpecs") { for (spec in conf.certificate) verify(spec) } }
conf.netcat?.let { task("NetcatSpecs") { for (spec in conf.netcat) verify(spec); dummySuccess } }
conf.socket?.let { task("SocketSpecs") { for (spec in conf.socket) verify(spec); dummySuccess } }
conf.certificate?.let { task("CertificateFileSpecs") { for (spec in conf.certificate) verify(spec); dummySuccess } }
dummySuccess // to be sure that at least one result is provided
} }
fun Prov.verify(cmd: CommandSpec) { fun Prov.verify(cmd: CommandSpec) {