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 state: absent
- set_fact: - 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 - name: check if old package directory exists
stat: stat:
@ -68,7 +68,7 @@
install_required: install_required:
'{{installed_version is not defined or '{{installed_version is not defined or
installed_version != latest.json.tag_name}}' 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' package_dir: '/usr/local/stow/nvim'
- set_fact: - set_fact:
uninstall_required: '{{nvim.stat.exists and install_required}}' uninstall_required: '{{nvim.stat.exists and install_required}}'
@ -78,7 +78,7 @@
- name: remove nuisance mimeinfo.cache file - name: remove nuisance mimeinfo.cache file
become: true become: true
file: 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 state: absent
- name: uninstall old package from /usr/local - name: uninstall old package from /usr/local
@ -86,13 +86,13 @@
become: true become: true
command: command:
cmd: 'stow --delete --target /usr/local .' cmd: 'stow --delete --target /usr/local .'
chdir: '{{package_dir}}/nvim-linux64' chdir: '{{package_dir}}/nvim-linux-x86_64'
- name: remove old package - name: remove old package
become: true become: true
when: uninstall_required when: uninstall_required
file: file:
path: '{{package_dir}}/nvim-linux64' path: '{{package_dir}}/nvim-linux-x86_64'
state: absent state: absent
- name: create package directory - name: create package directory
@ -128,6 +128,6 @@
become: true become: true
command: command:
cmd: 'stow --no-folding --target /usr/local .' cmd: 'stow --no-folding --target /usr/local .'
chdir: '{{package_dir}}/nvim-linux64' chdir: '{{package_dir}}/nvim-linux-x86_64'
- include_tasks: Unix.yaml - include_tasks: Unix.yaml