Skip to content

Commit

Permalink
locate error.txt for projects without an explicit commit param
Browse files Browse the repository at this point in the history
  • Loading branch information
zapnap committed Aug 24, 2010
1 parent 55c86a0 commit 70cc7eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ def shorten_commit_link(commit)
return "YES" if libs.find {|l| l.version == params[:commit] }
end

if File.file?("#{options.tmp}/#{[params[:project], params[:username], params[:commit]].join('_')}.error.txt")
puts "#{options.tmp}/#{[params[:project], params[:username], params[:commit]].join('_')}.error.txt found"
if File.file?("#{options.tmp}/#{[params[:project], params[:username], params[:commit] || 'master'].join('_')}.error.txt")
puts "#{options.tmp}/#{[params[:project], params[:username], params[:commit] || 'master'].join('_')}.error.txt found"
"ERROR"
else
puts "#{options.tmp}/#{[params[:project], params[:username], params[:commit]].join('_')}.error.txt not found"
puts "#{options.tmp}/#{[params[:project], params[:username], params[:commit] || 'master'].join('_')}.error.txt not found"
"NO"
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/scm_checkout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def checkout(url, name, commit = nil, scheme = "git")
out = `#{co_cmd}`
result = $?
puts "#{Time.now}: Checkout command (#{result}): #{co_cmd}"
errorfile = "#{options.tmp}/#{[name.gsub('/', '_'), commit].join('_')}.error.txt"
errorfile = "#{options.tmp}/#{[name.gsub('/', '_'), commit || 'master'].join('_')}.error.txt"
if result == 0
register_project(name)
File.unlink(errorfile) if File.file?(errorfile)
Expand Down

0 comments on commit 70cc7eb

Please sign in to comment.