diff --git a/build.gradle b/build.gradle index 8f26470..1766869 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ apply plugin: "kotlinx-serialization" group = "org.domaindrivenarchitecture.provs" -version = "0.10.2-SNAPSHOT" +version = "release-0.11.0" repositories { mavenCentral() diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt index 162df2b..c0bd5a6 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt @@ -55,7 +55,7 @@ fun Prov.createFileFromResourceTemplate( ): ProvResult = task { createFile( fullyQualifiedFilename, - getResourceAsText(resourcePath.endingWithFileSeparator() + resourceFilename).resolve(values), + getResourceResolved(resourcePath.endingWithFileSeparator() + resourceFilename, values), posixFilePermission, sudo ) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/syspec/infrastructure/Verification.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/syspec/infrastructure/Verification.kt index eecba8e..2195dbe 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/syspec/infrastructure/Verification.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/syspec/infrastructure/Verification.kt @@ -12,19 +12,14 @@ import java.util.* import java.util.concurrent.TimeUnit fun Prov.verifySpecConfig(conf: SyspecConfig) = task { - // required to guarantee that at least one result can be provided - val dummySuccess = ProvResult(true) - - conf.command?.let { task("CommandSpecs") { for (spec in conf.command) verify(spec); dummySuccess } } - conf.file?.let { task("FileSpecs") { for (spec in conf.file) verify(spec); dummySuccess } } - conf.folder?.let { task("FolderSpecs") { for (spec in conf.folder) verify(spec); dummySuccess } } - conf.host?.let { task("HostSpecs") { for (spec in conf.host) verify(spec); dummySuccess } } - conf.`package`?.let { task("PackageSpecs") { for (spec in conf.`package`) verify(spec); dummySuccess } } - 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 + conf.command?.let { task("CommandSpecs") { for (spec in conf.command) verify(spec) } } + 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.host?.let { task("HostSpecs") { for (spec in conf.host) verify(spec) } } + conf.`package`?.let { task("PackageSpecs") { for (spec in conf.`package`) verify(spec) } } + conf.netcat?.let { task("NetcatSpecs") { for (spec in conf.netcat) verify(spec) } } + conf.socket?.let { task("SocketSpecs") { for (spec in conf.socket) verify(spec) } } + conf.certificate?.let { task("CertificateFileSpecs") { for (spec in conf.certificate) verify(spec) } } } fun Prov.verify(cmd: CommandSpec) {