Fix neovim install after release package asset name change

This commit is contained in:
Kenneth Benzie 2025-01-31 10:02:37 +00:00
parent 002bc54819
commit 518efca73d

View File

@ -10,7 +10,7 @@
state: absent
- set_fact:
old_package_dir: '/usr/local/lib/nvim/nvim-linux64'
old_package_dir: '/usr/local/lib/nvim/nvim-linux-x86_64'
- name: check if old package directory exists
stat:
@ -68,7 +68,7 @@
install_required:
'{{installed_version is not defined or
installed_version != latest.json.tag_name}}'
asset_query: '[?contains(name, `nvim-linux64.tar.gz`)]'
asset_query: '[?contains(name, `nvim-linux-x86_64.tar.gz`)]'
package_dir: '/usr/local/stow/nvim'
- set_fact:
uninstall_required: '{{nvim.stat.exists and install_required}}'
@ -78,7 +78,7 @@
- name: remove nuisance mimeinfo.cache file
become: true
file:
path: /usr/local/stow/nvim/nvim-linux64/share/applications/mimeinfo.cache
path: /usr/local/stow/nvim/nvim-linux-x86_64/share/applications/mimeinfo.cache
state: absent
- name: uninstall old package from /usr/local
@ -86,13 +86,13 @@
become: true
command:
cmd: 'stow --delete --target /usr/local .'
chdir: '{{package_dir}}/nvim-linux64'
chdir: '{{package_dir}}/nvim-linux-x86_64'
- name: remove old package
become: true
when: uninstall_required
file:
path: '{{package_dir}}/nvim-linux64'
path: '{{package_dir}}/nvim-linux-x86_64'
state: absent
- name: create package directory
@ -128,6 +128,6 @@
become: true
command:
cmd: 'stow --no-folding --target /usr/local .'
chdir: '{{package_dir}}/nvim-linux64'
chdir: '{{package_dir}}/nvim-linux-x86_64'
- include_tasks: Unix.yaml