You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/09/23 14:12:28 UTC
svn commit: r1389027 - in /buildr/trunk: CHANGELOG lib/buildr/core/cc.rb
Author: donaldp
Date: Sun Sep 23 12:12:28 2012
New Revision: 1389027
URL: http://svn.apache.org/viewvc?rev=1389027&view=rev
Log:
BUILDR-627 Support explicitly listed source files in buildr cc task. (Christopher Tiwald)
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/core/cc.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1389027&r1=1389026&r2=1389027&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sun Sep 23 12:12:28 2012
@@ -1,4 +1,5 @@
1.4.8 (Pending)
+* Fixed: BUILDR-627 Support explicitly listed source files in buildr cc task. (Christopher Tiwald)
* Fixed: BUILDR-606 Transitive artifact resolution should not include artifacts in 'provided' scope in poms to
match maven behaviour. (Julio Arias)
* Change: BUILDR-640 Enable building jekyll and rdoc under more rubies. (Niklaus Giger)
Modified: buildr/trunk/lib/buildr/core/cc.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/cc.rb?rev=1389027&r1=1389026&r2=1389027&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/cc.rb (original)
+++ buildr/trunk/lib/buildr/core/cc.rb Sun Sep 23 12:12:28 2012
@@ -53,21 +53,27 @@ module Buildr
build_failed(project, ex)
end
- dirs = []
+ srcs = []
each_project do |p|
- dirs += p.compile.sources.map(&:to_s)
- dirs += p.test.compile.sources.map(&:to_s)
- dirs += p.resources.sources.map(&:to_s)
+ srcs += p.compile.sources.map(&:to_s)
+ srcs += p.test.compile.sources.map(&:to_s)
+ srcs += p.resources.sources.map(&:to_s)
end
- if dirs.length == 1
- info "Monitoring directory: #{dirs.first}"
+ if srcs.length == 1
+ info "Monitoring directory: #{srcs.first}"
else
- info "Monitoring directories: [#{dirs.join ', '}]"
+ info "Monitoring directories: [#{srcs.join ', '}]"
end
timestamps = lambda do
times = {}
- dirs.each { |d| Dir.glob("#{d}/**/*").map { |f| times[f] = File.mtime f } }
+ srcs.each do |a|
+ if File.directory? a
+ Dir.glob("#{a}/**/*").map { |f| times[f] = File.mtime f }
+ else
+ times[a] = File.mtime a
+ end
+ end
times
end