184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
# File 'lib/logical-construct/archive-tasks.rb', line 184
def define
super
in_namespace do
file listfile.absolute_path => [Rake.application.rakefile, marshalling.absolute_path] + source_files do |task|
require 'pathname'
source_pathname = Pathname.new(unpacked_dir.absolute_path)
files = source_files.map do |path|
Pathname.new(path)
end.find_all do |pathname|
not (pathname.directory? and not pathname.children.empty?)
end.map do |pathname|
pathname.relative_path_from source_pathname
end
File::open(listfile.absolute_path, "w") do |list|
list.write(files.join("\n"))
end
end
PackTarballTask.define_task(archive.absolute_path => [marshalling.absolute_path] + source_files + [listfile.absolute_path]) do |task|
copy_settings_to(task)
end
task archive.absolute_path => Rake.application.rakefile unless Rake.application.rakefile.nil?
end
end
|