Created
July 30, 2013 20:02
-
-
Save bdangit/6116374 to your computer and use it in GitHub Desktop.
This is the Thorfile I use in order to perform cookbook version bumps and then upload them to my Chef Server. Since I am using Berkshelf v2.0.7 and a Mac, I have to ensure that there are no .DS_Store files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'bundler' | |
require 'bundler/setup' | |
require 'thor/foodcritic' | |
require 'thor/scmversion' | |
require 'berkshelf/thor' | |
class Berksolo < Thor | |
include Thor::Actions | |
# Note on using berkshelf v2.0.7, a bug prevents uploading to Chef | |
# Server. Need to delete all .DS_Store files since Ridley doesn't | |
# respect the chefignore properly for .DS_Store files | |
# ref: http://lists.opscode.com/sympa/arc/chef/2013-07/msg00154.html | |
# ref: https://github.com/RiotGames/berkshelf/issues/587 | |
desc "upload", "prepares cookbook and uploads it Chef Server" | |
def upload | |
run "find . -name '*.DS_Store' -type f -delete" | |
thor "version:bump", "auto" | |
thor "berkshelf:upload" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment