Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add in a Rakefile for generating tarballs and metadata.

  • Loading branch information...
commit bc6cb3a3153216a8eeb918d5a8adb6ba49420617 1 parent 49936df
Graeme Mathieson authored January 24, 2011

Showing 2 changed files with 50 additions and 0 deletions. Show diff stats Hide diff stats

  1. 17  Rakefile
  2. 33  metadata.json
17  Rakefile
... ...
@@ -0,0 +1,17 @@
  1
+require 'rubygems'
  2
+require 'chef'
  3
+require 'json'
  4
+
  5
+desc "Generate an updated JSON metadata file"
  6
+task :metadata do
  7
+  cook_meta = Chef::Cookbook::Metadata.new
  8
+  cook_meta.from_file('metadata.rb')
  9
+  File.open('metadata.json', 'w') do |f|
  10
+    f.write(JSON.pretty_generate(cook_meta))
  11
+  end
  12
+end
  13
+
  14
+desc "Create an archive for uploading to cookbooks.opscode.com"
  15
+task :archive do
  16
+  sh %{git archive --format=tar --prefix=homebrew/ HEAD |gzip -9 > homebrew.tar.gz}
  17
+end
33  metadata.json
... ...
@@ -0,0 +1,33 @@
  1
+{
  2
+  "suggestions": {
  3
+  },
  4
+  "conflicting": {
  5
+  },
  6
+  "long_description": "= Description\n\nInstalls Homebrew and acts as the native package provider for Mac OS X using\nHomebrew to install packages. See:\n\nhttp://woss.name/2011/01/23/converging-your-home-directory-with-chef/\n\nfor additional background.\n\n= Requirements\n\n== Platform\n\nThis is only going to work on platforms that Homebrew supports which is, I\nthink, just Mac OS X. This cookbook has been tested on Mac OS X 10.6.6 with the\nlatest version of Homebrew (as of Mon 24 Jan 2011 at any rate!).\n\n== Cookbooks\n\nShouldn't require any other cookbooks, though its operation may be greatly\nenhanced by another cookbook I'm brewing that manages launchd. ;-)\n\n= Resources and Providers\n\nThis cookbook provides a package provider called +homebrew_package+ which will\ninstall/remove packages using Homebrew. This becomes the default provider for\n+package+ if your platform is Mac OS X.\n\n= Attributes\n\nNone.\n\n= Usage\n\nJust make sure that this cookbook is selected before you start installing\npackages. You can add:\n\n  include_recipe 'homebrew'\n\nto all your recipes that install packages, or you can just make sure it's on\nthe run list somewhere early on. The bookbook itself ensures that Homebrew is\ninstalled and up to date.\n\n= License and Author\n\nAuthor:: Graeme Mathieson (<mathie@woss.name>)\n\nCopyright:: 2011, Graeme Mathieson\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
  7
+  "providing": {
  8
+  },
  9
+  "platforms": {
  10
+    "mac_os_x": [
  11
+
  12
+    ]
  13
+  },
  14
+  "license": "Apache 2.0",
  15
+  "maintainer": "Graeme Mathieson",
  16
+  "replacing": {
  17
+  },
  18
+  "maintainer_email": "mathie@woss.name",
  19
+  "name": "",
  20
+  "version": "1.0.0",
  21
+  "groupings": {
  22
+  },
  23
+  "dependencies": {
  24
+  },
  25
+  "description": "Install Homebrew and use it as your package provider in Mac OS X",
  26
+  "recipes": {
  27
+    "homebrew": "Install Homebrew"
  28
+  },
  29
+  "attributes": {
  30
+  },
  31
+  "recommendations": {
  32
+  }
  33
+}

0 notes on commit bc6cb3a

Please sign in to comment.
Something went wrong with that request. Please try again.