Sha256: 9f67db29d7ae10d9ff04c03f5db374f2d0fe19f6c2fc5030de94b5807177045d
Contents?: true
Size: 631 Bytes
Versions: 12
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true # takelage git check main module GitCheckMain # Backend method for git check main. # @return [Boolean] are we on the git main branch? def git_check_main log.debug 'Check if we are on the git main branch' return false unless git_check_workspace branch = _git_check_main_get_branch log.debug "We are on git branch \"#{branch}\"" branch == config.active['git_main_branch'] end private # Get git branch. def _git_check_main_get_branch cmd_get_branch = config.active['cmd_git_check_main_git_branch'] (run cmd_get_branch).strip.split('/')[-1] end end
Version data entries
12 entries across 12 versions & 1 rubygems