diff options
author | mwrock <matt@mattwrock.com> | 2020-11-17 13:08:59 -0800 |
---|---|---|
committer | mwrock <matt@mattwrock.com> | 2020-11-17 13:08:59 -0800 |
commit | bd6dc3c8eadb23713a4d50ef6284a08563b25a60 (patch) | |
tree | 07615f51d7047cedab386f86a2e2be89fb1b5764 /Rakefile | |
parent | 225268c1a4697b06d067420d69b3def1ea48b092 (diff) | |
download | chef-bd6dc3c8eadb23713a4d50ef6284a08563b25a60.tar.gz |
update pwsh in powershell_exec to 7.1.0 and add comments explaining how to pull in updatesps71
Signed-off-by: mwrock <matt@mattwrock.com>
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -88,6 +88,25 @@ task :register_eventlog do end end +desc "Copies powershell_exec related binaries from the latest built Habitat Packages" +task :update_chef_exec_dll do + raise "This task must be run on Windows since we are installing a Windows targeted package!" unless Gem.win_platform? + + require "mkmf" + raise "Unable to locate Habitat cli. Please install Habitat cli before invoking this task!" unless find_executable "hab" + + sh("hab pkg install chef/chef-powershell-shim") + sh("hab pkg install chef/chef-powershell-shim-x86") + x64 = `hab pkg path chef/chef-powershell-shim`.chomp.gsub(/\\/, "/") + x86 = `hab pkg path chef/chef-powershell-shim-x86`.chomp.gsub(/\\/, "/") + FileUtils.rm_rf(Dir["distro/ruby_bin_folder/AMD64/*"]) + FileUtils.rm_rf(Dir["distro/ruby_bin_folder/x86/*"]) + puts "Copying #{x64}/bin/* to distro/ruby_bin_folder/AMD64" + FileUtils.cp_r(Dir["#{x64}/bin/*"], "distro/ruby_bin_folder/AMD64") + puts "Copying #{x86}/bin/* to distro/ruby_bin_folder/x86" + FileUtils.cp_r(Dir["#{x86}/bin/*"], "distro/ruby_bin_folder/x86") +end + begin require "chefstyle" require "rubocop/rake_task" |