now only copying & removing the binary if the binary has been compiled previously

This commit is contained in:
aminnairi
2024-11-30 18:52:31 +01:00
parent ec35d5e59f
commit 086f85aab1
@@ -15,15 +15,16 @@
chdir: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align chdir: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align
cmd: deno compile index.ts cmd: deno compile index.ts
when: git_clone_result.changed when: git_clone_result.changed
register: compile_the_binary
- name: Copy the binary - name: Copy the binary
ansible.builtin.copy: ansible.builtin.copy:
src: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align/markdown-table-align src: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align/markdown-table-align
dest: /$HOME/.local/bin dest: /$HOME/.local/bin
when: git_clone_result.changed when: compile_the_binary.changed
- name: Remove the binary - name: Remove the binary
ansible.builtin.file: ansible.builtin.file:
path: /$HOME/Document/git/github.com/aminnairi/markdown-table-align/markdown-table-align path: /$HOME/Document/git/github.com/aminnairi/markdown-table-align/markdown-table-align
state: absent state: absent
when: git_clone_result.changed when: compile_the_binary.changed