Commit d04a2d46 authored by Kamil Trzciński's avatar Kamil Trzciński

Fixed problem allowing commands to consume build script making the build to...

Fixed problem allowing commands to consume build script making the build to succeed even if not all commands were executed
parent 3816c861
......@@ -15,6 +15,7 @@ v 0.4.0
- Fixed Windows runner
- Fixed installation scripts path
- Fixed wrong architecture for i386 debian packages
- Fixed problem allowing commands to consume build script making the build to succeed even if not all commands were executed
v 0.3.4
- Create path before clone to fix Windows issue
......
......@@ -54,6 +54,8 @@ func (b *BashShell) GenerateScript(build *common.Build, shellType common.ShellTy
io.WriteString(w, "#!/usr/bin/env bash\n")
io.WriteString(w, "\n")
io.WriteString(w, ": | (") // close stdin
io.WriteString(w, "\n")
if len(build.Hostname) != 0 {
io.WriteString(w, fmt.Sprintf("echo Running on $(hostname) via %s...\n", helpers.ShellEscape(build.Hostname)))
} else {
......@@ -72,13 +74,15 @@ func (b *BashShell) GenerateScript(build *common.Build, shellType common.ShellTy
b.writeCheckoutCmd(w, build)
io.WriteString(w, "\n")
if !helpers.BoolOrDefault(build.Runner.DisableVerbose, false) {
io.WriteString(w, "set -v\n")
io.WriteString(w, "set -x\n")
io.WriteString(w, "\n")
}
commands := build.Commands
commands = strings.Replace(commands, "\r\n", "\n", -1)
io.WriteString(w, commands)
io.WriteString(w, "")
io.WriteString(w, ")")
w.Flush()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment