Sha256: f939db2394ba88142a23d7e262b7880a22e63bf86069fb63fffd56e2d9788902

Contents?: true

Size: 500 Bytes

Versions: 9

Compression:

Stored size: 500 Bytes

Contents

module Instapusher2
  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

9 entries across 9 versions & 2 rubygems

Version Path
instapusher2-0.0.8 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.7 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.6 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.5 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.4 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.3 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.2 lib/instapusher2/tag_the_release.rb
instapusher2-0.0.1 lib/instapusher2/tag_the_release.rb
instapusher-0.0.1 lib/instapusher2/tag_the_release.rb