Sha256: 728ddbf8f92f24852370af3c41ac778b874c6991f34482c9fa16f97ac1b75633

Contents?: true

Size: 1.22 KB

Versions: 16

Compression:

Stored size: 1.22 KB

Contents

#
# Jeweler has hardcoded the 'master' branch as where to push from.
# We hardcode it right back in.
#

module Jeweler::Commands

  PUSH_FROM_BRANCH = 'version_3' unless defined?(PUSH_FROM_BRANCH)

  ReleaseToGit.class_eval do
    def run
      branch = PUSH_FROM_BRANCH
      remote = 'origin'

      unless clean_staging_area?
        system "git status"
        raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
      end

      repo.checkout(branch)
      repo.push(remote, branch)

      if release_not_tagged?
        output.puts "Tagging #{release_tag}"
        repo.add_tag(release_tag)

        output.puts "Pushing #{release_tag} to origin"
        repo.push('origin', release_tag)
      end
    end
  end

  ReleaseGemspec.class_eval do
    def run
      branch = PUSH_FROM_BRANCH
      remote = 'origin'

      unless clean_staging_area?
        system "git status"
        raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
      end

      repo.checkout(branch)

      regenerate_gemspec!
      commit_gemspec! if gemspec_changed?

      output.puts "Pushing #{branch} to origin"
      repo.push(remote, branch)
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
cluster_chef-3.0.14 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.14 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.12 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.12 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.11 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.11 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.10 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.10 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.9 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.9 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.8 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.8 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.7 tasks/jeweler_use_alt_branch.rake
cluster_chef-3.0.6 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.7 tasks/jeweler_use_alt_branch.rake
cluster_chef-knife-3.0.6 tasks/jeweler_use_alt_branch.rake