You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
671 B
20 lines
671 B
package de.joshavg
|
|
|
|
import java.io.File
|
|
import java.time.ZonedDateTime
|
|
|
|
fun processBuilder(config: BuildConfig, logFile: File, rev: String): ProcessBuilder =
|
|
ProcessBuilder()
|
|
.directory(File(config.workspace))
|
|
.redirectOutput(logFile)
|
|
.redirectError(logFile)
|
|
.apply {
|
|
environment().putAll(config.env)
|
|
environment()["ALFRED_LOG_FILE"] = logFile.absolutePath
|
|
environment()["ALFRED_REV"] = rev
|
|
}
|
|
|
|
fun logFileHeader(logFile: File, buildId : BuildId, rev: String) {
|
|
logFile.appendText("THE ALFRED!\n")
|
|
logFile.appendText("Build $buildId, rev $rev started at ${ZonedDateTime.now()}\n\n")
|
|
} |