lib/buildbox/runner.rb in buildbox-0.4.2 vs lib/buildbox/runner.rb in buildbox-0.5
- old
+ new
@@ -1,7 +1,8 @@
require 'celluloid'
require 'fileutils'
+require 'childprocess'
module Buildbox
class Runner
include Celluloid
include Celluloid::Logger
@@ -36,13 +37,19 @@
end
private
def directory_path
- @directory_path ||= Buildbox.root_path.join(@build.namespace)
+ @directory_path ||= Buildbox.home_path.join(@build.namespace)
end
def script_path
- @script_path ||= Buildbox.root_path.join("buildbox-#{@build.namespace.gsub(/\//, '-')}-#{@build.id}")
+ @script_path ||= Buildbox.home_path.join(script_name)
+ end
+
+ def script_name
+ name = "#{@build.namespace.gsub(/\//, '-')}-#{@build.id}"
+ name << ".bat" if ChildProcess.platform == :windows
+ name
end
end
end