parent
6f4326502c
commit
fc284607a7
@ -0,0 +1,18 @@
|
|||||||
|
package alfred.web.core
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
|
@Service
|
||||||
|
class Processes {
|
||||||
|
|
||||||
|
fun builder(config: BuildConfig, logFile: LogFile, rev: String): ProcessBuilder =
|
||||||
|
ProcessBuilder()
|
||||||
|
.redirectOutput(ProcessBuilder.Redirect.appendTo(logFile.backingFile))
|
||||||
|
.redirectError(ProcessBuilder.Redirect.appendTo(logFile.backingFile))
|
||||||
|
.apply {
|
||||||
|
environment().putAll(config.env)
|
||||||
|
environment()["ALFRED_LOG_FILE"] = logFile.backingFile.absolutePath
|
||||||
|
environment()["ALFRED_REV"] = rev
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,11 +0,0 @@
|
|||||||
package alfred.web.core
|
|
||||||
|
|
||||||
fun processBuilder(config: BuildConfig, logFile: LogFile, rev: String): ProcessBuilder =
|
|
||||||
ProcessBuilder()
|
|
||||||
.redirectOutput(ProcessBuilder.Redirect.appendTo(logFile.backingFile))
|
|
||||||
.redirectError(ProcessBuilder.Redirect.appendTo(logFile.backingFile))
|
|
||||||
.apply {
|
|
||||||
environment().putAll(config.env)
|
|
||||||
environment()["ALFRED_LOG_FILE"] = logFile.backingFile.absolutePath
|
|
||||||
environment()["ALFRED_REV"] = rev
|
|
||||||
}
|
|
Loading…
Reference in new issue