Skip to content

Commit

Permalink
WinPB: Update Wix5 Installation To Be Global (adoptium#3628)
Browse files Browse the repository at this point in the history
  • Loading branch information
steelhead31 authored Jul 1, 2024
1 parent 9f556dd commit 5fe6063
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- name: Test if WiX is already installed
win_stat:
path: 'C:\\Users\{{ Jenkins_Username }}\.dotnet/tools/wix'
path: 'C:\\Program Files\\dotnet\\wix.exe'
register: wix_installed
tags: Wix

Expand All @@ -35,25 +35,19 @@

- name: Test if WiX is already installed
win_stat:
path: 'C:\\Users\{{ Jenkins_Username }}\.dotnet/tools/wix'
path: 'C:\\Program Files\\dotnet\\wix.exe'
register: wix_installed
tags: Wix

- name: Test WiX version
# generates an output like 5.0.0+41e11442
win_shell: wix --version
register: installed_wix_version
become_user: "{{ Jenkins_Username }}"
become_method: ansible.builtin.runas
become: true
when: wix_installed.stat.exists
tags: Wix

- name: Install Wix Toolset when not installed or version is not correct
win_shell: dotnet tool install --global wix --version {{ wix_version }}
become_user: "{{ Jenkins_Username }}"
become_method: ansible.builtin.runas
become: true
win_shell: dotnet tool install wix --version {{ wix_version }} --tool-path 'C:\\Program Files\\dotnet'
when: (not wix_installed.stat.exists) or (installed_wix_version.stdout.find(wix_version) == -1)
tags: Wix

Expand Down

0 comments on commit 5fe6063

Please sign in to comment.