Permalink
Browse files

Version bump to 0.0.2

  • Loading branch information...
mdxp committed May 17, 2012
1 parent fd3e945 commit 6f120b96a8f2cf4b535b2d3cee2016885c223cc5
Showing with 6 additions and 2 deletions.
  1. +1 −1 VERSION
  2. +5 −1 lib/chef/jenkins.rb
View
@@ -1 +1 @@
-0.0.1
+0.0.2
View
@@ -157,7 +157,11 @@ def prop(env_from=Chef::Config[:jenkins][:env_from], env_to=Chef::Config[:jenkin
def save_environment_file(env_to=Chef::Config[:jenkins][:env_to])
Chef::Log.info("Saving environmnent #{env_to} to #{env_to}.json")
dir = Chef::Config[:jenkins][:repo_dir]
- `knife environment show "#{env_to}" -Fj > "#{dir}/environments/#{env_to}.json"`
+
+ envto = Chef::Environment.load(env_to)
+ File.open(File.join(dir, "environments/#{envto}.json"), "w") do |env_file|
+ env_file.print(JSON.pretty_generate(envto))
+ end
@git.add("#{dir}/environments/#{env_to}.json")
@git.commit("Updating #{env_to} with the latest cookbook versions", :allow_empty => true)

0 comments on commit 6f120b9

Please sign in to comment.