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
avm-git-0.18.0 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.94.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
avm-git-0.17.0 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.86.5 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
avm-git-0.16.0 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.86.4 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.86.3 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
avm-git-0.15.0 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.86.2 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.84.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.83.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.82.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
avm-git-0.14.0 lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.81.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.80.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.79.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.78.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.77.1 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.77.0 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb
eac_tools-0.76.1 sub/avm-git/lib/avm/git/issue/complete/local_tag.rb