lib/gjp/archiver.rb in gjp-0.26.0 vs lib/gjp/archiver.rb in gjp-0.27.0
- old
+ new
@@ -8,23 +8,23 @@
def initialize(project)
@project = project
end
# generates an archive for the kit package
- def archive_kit(incremental)
+ def archive_kit(full)
destination_dir = File.join(@project.full_path, "output", "#{@project.name}-kit")
FileUtils.mkdir_p(destination_dir)
destination_file_prefix = "#{@project.name}-kit"
destination_file_suffix = ".tar.xz"
@project.take_snapshot "Kit archival started"
- destination_file = if incremental
- log.debug "doing incremental archive"
- archive_incremental("kit", destination_dir, destination_file_prefix, destination_file_suffix, :archive_kit)
- else
+ destination_file = if full
remove_stale_incremental(destination_dir, destination_file_prefix, destination_file_suffix)
archive_single("kit", File.join(destination_dir, destination_file_prefix + destination_file_suffix))
+ else
+ log.debug "doing incremental archive"
+ archive_incremental("kit", destination_dir, destination_file_prefix, destination_file_suffix, :archive_kit)
end
@project.take_snapshot "Kit archive generated", :archive_kit
destination_file