Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def initialize(data)
end

def run
@run_file = Tempfile.new("executor")
FileUtils.mkdir_p(config.jobs_dir) unless File.exists?(config.jobs_dir)

@run_file = Tempfile.new("executor", config.jobs_dir)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@run_file.chmod(0700)

@commands.unshift(checkout_cmd)
Expand Down
4 changes: 4 additions & 0 deletions lib/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def builds_dir
@builds_path ||= File.join($root_path, 'tmp', 'builds')
end

def jobs_dir
@jobs_path ||= File.join($root_path, 'tmp', 'jobs')
end

def write(key, value)
@config[key] = value

Expand Down