Skip to content

Commit

Permalink
Switch back for internal VSCode HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffaluff committed Oct 31, 2024
1 parent a38ac4a commit 6095c4a
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
become: true
loop:
- "{{ vscode_path }}/product.json"
- "{{ vscode_path
}}/out/vs/code/electron-sandbox/workbench/workbench.esm.html"
- "{{ vscode_path }}/out/vs/code/electron-sandbox/workbench/workbench.html"
when: ansible_system != "Win32NT"

- name: Backup VSCode internal files for Windows
Expand All @@ -22,8 +21,7 @@
src: "{{ item }}"
loop:
- "{{ vscode_path }}/product.json"
- "{{ vscode_path
}}/out/vs/code/electron-sandbox/workbench/workbench.esm.html"
- "{{ vscode_path }}/out/vs/code/electron-sandbox/workbench/workbench.html"
when: ansible_system == "Win32NT"

- name: Update VSCode styles for Unix
Expand All @@ -34,8 +32,7 @@
marker: >-
<!--{mark} ANSIBLE MANAGED styles for vscode BLOCK-->
path: >-
{{ vscode_path
}}/out/vs/code/electron-sandbox/workbench/workbench.esm.html
{{ vscode_path }}/out/vs/code/electron-sandbox/workbench/workbench.html
become: true
when: ansible_system != "Win32NT"

Expand All @@ -45,16 +42,14 @@
insertbefore: </html>
line: "{{ vscode_custom_html | replace('\n', '') }}"
path: >-
{{ vscode_path
}}/out/vs/code/electron-sandbox/workbench/workbench.esm.html
{{ vscode_path }}/out/vs/code/electron-sandbox/workbench/workbench.html
state: present
when: ansible_system == "Win32NT"

- name: Read contents of VSCode workbench file
ansible.builtin.slurp:
src: >-
{{ vscode_path
}}/out/vs/code/electron-sandbox/workbench/workbench.esm.html
{{ vscode_path }}/out/vs/code/electron-sandbox/workbench/workbench.html
register: vscode_workbench_file

- name: Compute checksum of VSCode workbench file
Expand All @@ -68,7 +63,7 @@
backrefs: true
line: '\g<1>"{{ vscode_workbench_checksum }}",'
path: "{{ vscode_path }}/product.json"
regexp: '^(\s+"vs/code/electron-sandbox/workbench/workbench.esm.html":\s+)".*",$'
regexp: '^(\s+"vs/code/electron-sandbox/workbench/workbench.html":\s+)".*",$'
state: present
become: true
when: ansible_system != "Win32NT"
Expand All @@ -78,6 +73,6 @@
backrefs: true
line: '$1"{{ vscode_workbench_checksum }}",'
path: "{{ vscode_path }}/product.json"
regexp: '^(\s+"vs/code/electron-sandbox/workbench/workbench.esm.html":\s+)".*",$'
regexp: '^(\s+"vs/code/electron-sandbox/workbench/workbench.html":\s+)".*",$'
state: present
when: ansible_system == "Win32NT"

0 comments on commit 6095c4a

Please sign in to comment.