Sha256: a47ccf06f19409896d98a83037c6933ed74ae0ed60d9e59a9d024822e7fe8b3e

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

class Gem::Commands::TagCommand < Gem::Command
  include GemRelease
  include Helpers, CommandOptions

  attr_reader :arguments, :usage

  def initialize
    super 'tag', 'Create a git tag and push --tags to origin'
  end

  def execute
    tag
    push
  end
  
  protected

    def tag
      say "Creating git tag #{tag_name}"
      `git tag -am 'tag #{tag_name}' #{tag_name}`
    end

    def push
      say "Pushing --tags to origin git repository"
      `git push --tags origin`
    end
    
    def tag_name
      "v#{gem_version}"
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gem-release-0.0.13 lib/rubygems/commands/tag_command.rb