Only verify that the target branch doesn't exist

This commit is contained in:
Diego Herrera
2025-08-21 18:05:04 -04:00
parent d3972d8d66
commit 27d7161ea0

View File

@@ -126,7 +126,7 @@
- name: Create new epel branch for the new release
ansible.builtin.shell: |
if [ "$( git -C '{{ checkout_path }}/{{ item }}.git' rev-parse --verify epel{{ release }} 2> /dev/null)" != "$( git -C '{{ checkout_path }}/{{ item }}.git' rev-parse --verify {{ branch_from }} 2> /dev/null)" ]
if [ "$( git -C '{{ checkout_path }}/{{ item }}.git' rev-parse --verify epel{{ release }} 2> /dev/null)" == "" ]
then
git -C '{{ checkout_path }}/{{ item }}.git' branch epel{{ release }} {{ branch_from }}
else