Commit 41b16ca9 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 8628a76c
......@@ -13,6 +13,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 {
......@@ -79,6 +81,8 @@ func (b *BashShell) GenerateScript(build *common.Build, shellType common.ShellTy
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