-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated plan.sh file to work with different hab packages
Signed-off-by: nikhil2611 <nikhilgupta2102@gmail.com>
- Loading branch information
1 parent
f271ed6
commit 339820b
Showing
2 changed files
with
96 additions
and
90 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Print all the gems installed in the Chef Workstation omnibus as a JSON hash. This is | ||
# stored in the root of the Chef Workstation install next to the `version-manifest.json`. | ||
|
||
all_gems = {} | ||
|
||
Gem::Specification.load_defaults | ||
Gem::Specification.each do |spec| | ||
all_gems[spec.name] ||= [] | ||
all_gems[spec.name] << spec.version.to_s | ||
end | ||
|
||
require "json" | ||
j = JSON.pretty_generate(all_gems) | ||
|
||
gem_home = Gem.paths.home | ||
manifest_file = "#{gem_home}/gem-version-manifest.json" | ||
File.open(manifest_file, "w") do |f| | ||
f.write(j) | ||
end |
This file contains 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