Sha256: 699036a99571d6f6a8c5d7ebeb8f2f47ab40091a42fc7a2cb7dd6abf1b145b4d

Contents?: true

Size: 732 Bytes

Versions: 150

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

require 'avm/result'

module Avm
  module Git
    module Issue
      class Complete
        module LocalTag
          def assert_tag
            if tag_hash
              return if tag_hash == branch_hash

              delete_tag
            end
            create_tag
          end

          def delete_tag
            info 'Removendo tag...'
            git_execute(['tag', '-d', branch_name])
          end

          def tag
            "refs/tags/#{branch_name}"
          end

          def tag_hash
            launcher_git.rev_parse(tag)
          end

          def create_tag
            git_execute(['tag', branch_name, branch_hash])
          end
        end
      end
    end
  end
end

Version data entries

150 entries across 150 versions & 3 rubygems

Version Path
eac_tools-0.64.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.63.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.62.1 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.62.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
avm-git-0.13.2 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.61.1 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.61.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.60.3 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.60.2 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.60.1 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.60.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.59.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.58.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.57.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.56.1 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.56.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.55.7 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
avm-git-0.13.1 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.55.6 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.55.5 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb