add release tag to filename for starship updates

This commit is contained in:
Morgan McMillian 2024-10-17 12:27:11 -07:00
parent 1190a3f33d
commit ad5145b060

View file

@ -23,13 +23,13 @@
- name: Check if the release was previously downloaded
ansible.builtin.stat:
path: "{{ gh_bin_dir }}/{{ release_filename }}"
path: "{{ gh_bin_dir }}/{{ release_filename }}_{{ release_latest_tag }}"
register: release_local
- name: "Download the latest {{ gh_project }} release from GitHub"
ansible.builtin.get_url:
url: "https://github.com/{{ gh_user }}/{{ gh_project }}/releases/download/{{ release_latest_tag }}/{{ release_filename }}"
dest: "{{ gh_bin_dir }}"
dest: "{{ gh_bin_dir }}/{{ release_filename }}_{{ release_latest_tag }}"
mode: "0644"
checksum: sha256:https://github.com/{{ gh_user }}/{{ gh_project }}/releases/download/{{ release_latest['tag'] }}/{{ release_checksum }}
when: not release_local.stat.exists
@ -37,6 +37,6 @@
- name: "starship updated"
ansible.builtin.unarchive:
src: "{{ gh_bin_dir }}/{{ release_filename }}"
src: "{{ gh_bin_dir }}/{{ release_filename }}_{{ release_latest_tag }}"
dest: "{{ home_dir }}/bin"
when: starship_dl.changed