Sha256: af0973842c5a0f706f441bb2072327ecf4335a944b5378c4cd098e135dde5437

Contents?: true

Size: 932 Bytes

Versions: 4

Compression:

Stored size: 932 Bytes

Contents

mkdir <%= update_dir %>

> <%= recipe_path %> (
<%= recipe_code %>
)

chef-client -v | awk '{print $2}' | awk -F \. '{print $1}' > <%= update_dir %>\major_version.txt
SET /p installed_major_chef_version=<<%= update_dir %>\major_version.txt

IF %installed_major_chef_version% LSS 11 (
  mkdir <%= tmp_cookbook_path %>
  mkdir <%= tmp_recipes_path %>
  cp <%= recipe_path %> <%= tmp_recipes_path %>
  echo cookbook_path 'C:\chef\update\cookbooks' > <%= upgrade_solo_rb_path %>
  call <%= chef_solo_command %>
) else (
  call <%= chef_apply_command %>
)

> <%= update_dir %>\uninstall_chef.ps1 (
  <%= uninstall_chef %>
)

ls <%= update_dir %> | grep "chef-client" > <%= update_dir %>\msi_name.txt
SET /p msi_name=<<%= update_dir %>\msi_name.txt
powershell -ExecutionPolicy Unrestricted -NoProfile -NonInteractive <%= update_dir %>\uninstall_chef.ps1

msiexec /qb /norestart /i "<%= update_dir %>\%msi_name%"

rm -rf <%= update_dir %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ridley-connectors-2.4.0 scripts/windows_update_omnibus.erb
ridley-connectors-2.3.1 scripts/windows_update_omnibus.erb
ridley-connectors-2.3.0 scripts/windows_update_omnibus.erb
ridley-connectors-2.2.0 scripts/windows_update_omnibus.erb