Skip to content

Instantly share code, notes, and snippets.

@dagi3d
Last active December 15, 2015 22:49
Show Gist options
  • Save dagi3d/5335501 to your computer and use it in GitHub Desktop.
Save dagi3d/5335501 to your computer and use it in GitHub Desktop.
watch('cookbooks/.*/.*') do |file|
puts file
cookbook = file[0].split("/")[1]
system("knife cookbook upload #{cookbook}")
end
env = ENV['KNIFE_ENV'] || "development"
knife_file = File.join(File.dirname(__FILE__), "knife.#{env}.rb")
Chef::Config.from_file knife_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment