Sha256: 93f5e5c93a13ac1bbb3b4236cbad325e628f4fcc2b9a52daa66d269722e8bd9b

Contents?: true

Size: 841 Bytes

Versions: 24

Compression:

Stored size: 841 Bytes

Contents

module RakeRoll

  module GitCommands

    def get_current_branch
      #run as a direct command to retrieve the output
      `git rev-parse --abbrev-ref HEAD`.chomp
    end

    def git_push_branch(branch)
      puts "Pushing to origin #{branch}"
      system("git push origin #{branch}")
    end

    def git_push_tags
      puts "Pushing tags"
      system("git push --tags")
    end

    def git_log(log_type)
      #run as a direct command to retrieve the output
      `git log #{log_type}`
    end

    def git_add(file)
      puts "Adding #{file}"
      system("git add #{file}")
    end

    def git_tag(tag)
      puts "Creating tag #{new_version}"
      system("git tag #{tag}")
    end

    def git_commit(message)
      puts "Commiting: #{message}"
      system("git commit CHANGELOG VERSION -m '#{message}'")
    end

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rake_roll-2.3.0 lib/rake_roll/git_commands.rb
rake_roll-2.2.0 lib/rake_roll/git_commands.rb
rake_roll-2.1.3 lib/rake_roll/git_commands.rb
rake_roll-2.1.2 lib/rake_roll/git_commands.rb
rake_roll-2.1.1 lib/rake_roll/git_commands.rb
rake_roll-2.1.0 lib/rake_roll/git_commands.rb
rake_roll-2.0.5 lib/rake_roll/git_commands.rb
rake_roll-2.0.4 lib/rake_roll/git_commands.rb
rake_roll-2.0.3 lib/rake_roll/git_commands.rb
rake_roll-2.0.2 lib/rake_roll/git_commands.rb
rake_roll-2.0.1 lib/rake_roll/git_commands.rb
rake_roll-2.0.0 lib/rake_roll/git_commands.rb
rake_roll-1.0.3 lib/rake_roll/git_commands.rb
rake_roll-1.0.2 lib/rake_roll/git_commands.rb
rake_roll-1.0.1 lib/rake_roll/git_commands.rb
rake_roll-1.0.0 lib/rake_roll/git_commands.rb
rake_roll-0.4.0 lib/rake_roll/git_commands.rb
rake_roll-0.3.0 lib/rake_roll/git_commands.rb
rake_roll-0.2.5 lib/rake_roll/git_commands.rb
rake_roll-0.2.4 lib/rake_roll/git_commands.rb