Module: Semmy::Scm

Extended by:
Scm
Included in:
Scm
Defined in:
lib/semmy/scm.rb,
lib/semmy/scm/jj.rb,
lib/semmy/scm/git.rb

Defined Under Namespace

Modules: Git, Jj

Instance Method Summary collapse

Instance Method Details

#attach_git_headObject



34
35
36
# File 'lib/semmy/scm.rb', line 34

def attach_git_head
  repository.attach_git_head(release_branch)
end

#commit_all(message) ⇒ Object



22
23
24
# File 'lib/semmy/scm.rb', line 22

def commit_all(message)
  repository.commit_all(message, release_branch)
end

#create_branch(name) ⇒ Object



26
27
28
# File 'lib/semmy/scm.rb', line 26

def create_branch(name)
  repository.create_branch(name, release_branch)
end

#on_major_version_stable?(stable_branch_name) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/semmy/scm.rb', line 18

def on_major_version_stable?(stable_branch_name)
  !!release_branch.to_s.match(major_version_stable_branch_matcher(stable_branch_name))
end

#on_master?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/semmy/scm.rb', line 10

def on_master?
  release_branch == 'master'
end

#on_minor_version_stable?(stable_branch_name) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/semmy/scm.rb', line 14

def on_minor_version_stable?(stable_branch_name)
  !!release_branch.to_s.match(stable_branch_matcher(stable_branch_name))
end

#push(remote, name) ⇒ Object



30
31
32
# File 'lib/semmy/scm.rb', line 30

def push(remote, name)
  repository.push(remote, name)
end

#release_branchObject



38
39
40
# File 'lib/semmy/scm.rb', line 38

def release_branch
  @release_branch ||= repository.current_branch
end

#resetObject



42
43
44
# File 'lib/semmy/scm.rb', line 42

def reset
  @release_branch = nil
end