Skip to content

Commit a8a9c42

Browse files
committed
Fail on any subcommand failure.
1 parent 61e4277 commit a8a9c42

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build-linux-docker.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
end
1010

1111
target = "#{project}-linux-x64-#{version}"
12-
system("docker build -t #{project} .")
13-
system("docker run -it #{project}")
12+
system("docker build -t #{project} .") || fail
13+
system("docker run -it #{project}") || fail
1414
id = `docker ps -l -q`.strip
15-
system("docker cp #{id}:/src/#{project} ./#{target}")
16-
system("docker rm #{id}")
17-
system("docker run -it --rm -v #{Dir.pwd}/#{target}:/bin/#{project} golang:latest bash")
18-
system("docker rmi #{project}:latest")
15+
system("docker cp #{id}:/src/#{project} ./#{target}") || fail
16+
system("docker rm #{id}") || fail
17+
system("docker run -it --rm -v #{Dir.pwd}/#{target}:/bin/#{project} golang:latest bash") || fail
18+
system("docker rmi #{project}:latest") || fail

0 commit comments

Comments
 (0)