Sha256: 0d42bb76c6db899a0a0eeed2afaeef7c34c76fc2fa72c35c60df85ca7e2483e9

Contents?: true

Size: 839 Bytes

Versions: 6

Compression:

Stored size: 839 Bytes

Contents

class Chef
  class Knife
    class CookbookSCMRepoExtensions < CookbookSCMRepo

      def finalize_updates_from_github(cookbook_name, github_path, sha)
        if update_count = updated?(cookbook_name)
          ui.info "#{update_count} files updated, committing changes"
          git("add #{cookbook_name}")
          git("commit -m 'Import #{github_path} version #{sha}' -- #{cookbook_name}")
          ui.info("Creating tag cookbook-site-imported-#{cookbook_name}-#{sha}")
          git("tag -f cookbook-site-imported-#{cookbook_name}-#{sha}")
          true
        else
          ui.info("No changes made to #{cookbook_name}")
          false
        end
      end

      def last_log_message_from_cookbook(cookbook_name)
        git("log chef-vendor-#{cookbook_name} -n 1").stdout.split("\n").last.strip
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
knife-github-cookbooks-0.1.8 lib/chef/knife/core/coobook_scm_repo_extensions.rb
knife-github-cookbooks-0.1.7 lib/chef/knife/core/coobook_scm_repo_extensions.rb
knife-github-cookbooks-0.1.6 lib/chef/knife/core/coobook_scm_repo_extensions.rb
knife-github-cookbooks-0.1.5 lib/chef/knife/core/coobook_scm_repo_extensions.rb
knife-github-cookbooks-0.1.4 lib/chef/knife/core/coobook_scm_repo_extensions.rb
knife-github-cookbooks-0.1.3 lib/chef/knife/core/coobook_scm_repo_extensions.rb