Sha256: a87741aa8d7c3994fe3cc14606d3c94429330d7f7fda0304774b09ac0e29b33c

Contents?: true

Size: 499 Bytes

Versions: 13

Compression:

Stored size: 499 Bytes

Contents

module Instapusher
  class TagTheRelease

    attr_reader :branch_name, :debug

    def initialize branch_name, debug
      @branch_name = branch_name
      @debug = debug
    end

    def tagit
      version_number = Time.current.to_s.parameterize
      tag_name = "#{branch_name}-#{version_number}"

      cmd = "git tag -a -m \"Version #{tag_name}\" #{tag_name}"
      puts cmd if debug
      system cmd

      cmd =  "git push --tags"
      puts cmd if debug
      system cmd
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
instapusher-0.1.9 lib/instapusher/tag_the_release.rb
instapusher-0.1.8 lib/instapusher/tag_the_release.rb
instapusher-0.1.7 lib/instapusher/tag_the_release.rb
instapusher-0.1.6 lib/instapusher/tag_the_release.rb
instapusher-0.1.5 lib/instapusher/tag_the_release.rb
instapusher-0.1.4 lib/instapusher/tag_the_release.rb
instapusher-0.1.3 lib/instapusher/tag_the_release.rb
instapusher-0.1.2 lib/instapusher/tag_the_release.rb
instapusher-0.1.1 lib/instapusher/tag_the_release.rb
instapusher-0.1.0 lib/instapusher/tag_the_release.rb
instapusher-0.0.34 lib/instapusher/tag_the_release.rb
instapusher-0.0.33 lib/instapusher/tag_the_release.rb
instapusher-0.0.32 lib/instapusher/tag_the_release.rb