Class: Geb::CLI::Commands::Release

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/geb/commands/release.rb

Overview

Define release command

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object

Call method for the release command



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/geb/commands/release.rb', line 30

def call(**options)

  # initialise a new site and load the site from the current directory
  site = Geb::Site.new
  site.load(Dir.pwd)

  # create a new release for the site
  site.release()

  # bundle the site with a template archive if the with_template option is set
  site.bundle_template() if options[:with_template]

rescue Geb::Error => e

  # print error message
  puts
  warn e.message

end