Class: StiDeploy::Deploy

Inherits:
Object
  • Object
show all
Defined in:
lib/sti_deploy/deploy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDeploy

Returns a new instance of Deploy.



7
8
9
# File 'lib/sti_deploy/deploy.rb', line 7

def initialize
  @version = Version.load_version
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/sti_deploy/deploy.rb', line 5

def type
  @type
end

#versionObject (readonly)

Returns the value of attribute version.



5
6
7
# File 'lib/sti_deploy/deploy.rb', line 5

def version
  @version
end

Instance Method Details

#commit_merge_and_tag!Object



18
19
20
# File 'lib/sti_deploy/deploy.rb', line 18

def commit_merge_and_tag!
  Git.new(version, type).commit_merge_and_tag!(read_release_message)
end

#update_version!Object



11
12
13
14
15
16
# File 'lib/sti_deploy/deploy.rb', line 11

def update_version!
  version.bump(read_type)
  version.update_file!
  Messages.puts('version.increment', old: version.old, new: version.to_s,
                color: :green)
end