Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'build_dir'
  • Loading branch information
cpjolicoeur committed Jul 7, 2009
2 parents 1951d11 + 008e049 commit 466d737
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/cerberus/builder/bjam.rb
Expand Up @@ -8,8 +8,6 @@ def initialize(config)
end

def run
Dir.chdir @config[:application_root]

#set correct mountpoint if it present
build_dir = @config[:builder, :bjam, :build_dir]
Dir.chdir(build_dir) if build_dir
Expand All @@ -29,4 +27,4 @@ def successful?
def brokeness
return nil
end
end
end
1 change: 0 additions & 1 deletion lib/cerberus/builder/maven2.rb
Expand Up @@ -8,7 +8,6 @@ def initialize(config)
end

def run
Dir.chdir @config[:application_root]
cmd = @config[:builder, :maven2, :cmd] || 'mvn'
task = @config[:builder, :maven2, :task] || 'test'
@output = `#{@config[:bin_path]}#{cmd} #{system_properties} #{settings} #{task} 2>&1`
Expand Down
1 change: 0 additions & 1 deletion lib/cerberus/builder/rspec.rb
Expand Up @@ -6,7 +6,6 @@ def initialize(config)
end

def run
Dir.chdir @config[:application_root]
@output = if @config[:builder, @name.to_sym, :task]
`#{@config[:bin_path]}rake #{@config[:builder, @name.to_sym, :task]} 2>&1`
else
Expand Down
1 change: 0 additions & 1 deletion lib/cerberus/builder/ruby_base.rb
Expand Up @@ -10,7 +10,6 @@ def initialize(config, name, cmd = name)
end

def run
Dir.chdir @config[:application_root]
@output = `#{@config[:bin_path]}#{choose_exec()} #{@config[:builder, @name.to_sym, :task]} 2>&1`
successful?
end
Expand Down
3 changes: 3 additions & 0 deletions lib/cerberus/manager.rb
Expand Up @@ -113,6 +113,9 @@ def run
@scm.update!

if @scm.has_changes? or @config[:force] or @status.previous_build_successful.nil?
Dir.chdir File.join(@config[:application_root], @config[:build_dir] || '')
`#{@config[:setup]}` if @config[:setup]

build_successful = @builder.run
@status.keep(build_successful, @scm.current_revision, @builder.brokeness)

Expand Down

0 comments on commit 466d737

Please sign in to comment.