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



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

def initialize
  @version = Version.load_version
  @git_user = Configuration.git_username
end

Instance Attribute Details

#git_userObject (readonly)

Returns the value of attribute git_user.



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

def git_user
  @git_user
end

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

#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



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

def commit_merge_and_tag!
  git_commit!
  git_merge! unless same_origin_target_branches?
  git_tag!
end

#update_version!Object



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

def update_version!
  version.bump(read_type)
  version.update_file!
end