Class: ReleaseRunner

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/bento/release.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#banner, #box_metadata, #build_list, #builds_yml, #duration, #info, #macos?, #metadata_files, #private_box?, #unix?, #vc_account, #warn, #windows?

Constructor Details

#initialize(opts) ⇒ ReleaseRunner

Returns a new instance of ReleaseRunner.



8
9
10
11
# File 'lib/bento/release.rb', line 8

def initialize(opts)
  @box = opts.box
  @version = opts.version
end

Instance Attribute Details

#boxObject (readonly)

Returns the value of attribute box.



6
7
8
# File 'lib/bento/release.rb', line 6

def box
  @box
end

#versionObject (readonly)

Returns the value of attribute version.



6
7
8
# File 'lib/bento/release.rb', line 6

def version
  @version
end

Instance Method Details

#startObject



13
14
15
16
17
18
19
20
21
# File 'lib/bento/release.rb', line 13

def start
  banner("Releasing #{box}/#{version}...")
  time = Benchmark.measure do
    b = .get_box(box)
    v = b.get_version(version)
    v.release
  end
  banner("Release finished in #{duration(time.real)}.")
end