working on alacritty source install

- adding cargo build helper
This commit is contained in:
Matthew Stobbs
2026-01-24 13:26:07 -07:00
parent ff740426c8
commit 1a8f402c68
4 changed files with 147 additions and 43 deletions

View File

@@ -0,0 +1,39 @@
# vim: set filetype=yaml.ansible :
---
- name: Cargo source install helper
when:
- cargo_install_type == 'source'
block:
- name: Set build variables
ansible.builtin.set_fact:
git_path: "{{ d_tempdir.path }}/{{ name }}"
git_repo: "{{ repo }}"
git_depth: "{{ depth | default(1) }}"
git_recursive: "{{ recursive | default(true) }}"
git_version: "{{ version | default(omit) }}"
- name: Fetch git repo
ansible.builtin.include_tasks:
file: helpers/git.yml
- name: Build cargo release
ansible.builtin.command:
creates: "{{ bin_output }}"
chdir: "{{ git_path }}"
argv: "{{ [cargo, build] + cargo_build_flags }}"
- name: Install cargo release
block:
- name: Install binary
when:
- bin_name is defined
- bin_output is defined
become: true
ansible.builtin.copy:
backup: false
dest: "{{ install_prefix }}/bin/{{ bin_name }}"
owner: root
group: root
mode: "0755"
remote_src: true
src: "{{ git_path }}/{{ bin_output }}"