Sha256: 27ee2d501b2341b53f40a88c7ba8db64163b4464c436f83a223d3a52603b4f0f
Contents?: true
Size: 625 Bytes
Versions: 11
Compression:
Stored size: 625 Bytes
Contents
module OpenStax::Aws class PackerFactory # There are differences between Packer 1.2 and 1.4. This factory attempts to # provide the right version of packer class. def self.new_packer(absolute_file_path:, dry_run: true) packer_version = `packer --version` raise "packer is not installed" if packer_version.nil? packer_class = case packer_version when /^1.2/ Packer_1_2_5 else Packer_1_4_1 end @packer = packer_class.new(absolute_file_path: absolute_file_path, dry_run: dry_run) end end end
Version data entries
11 entries across 11 versions & 1 rubygems