mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Merge pull request #140 from Thulium-Drake/main
Added check to stop execution when the remote version is higher
This commit is contained in:
commit
098a3e1c39
2 changed files with 12 additions and 0 deletions
|
@ -97,6 +97,12 @@
|
|||
gitea_forgejo_signed_url: ['https://codeberg.org/attachments/ae5e50c6-e86e-4202-b95f-f142e8138e2f']
|
||||
when: ansible_check_mode
|
||||
|
||||
- name: 'Assert that remote version is higher'
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- gitea_active_version is version(gitea_remote_version, 'lt')
|
||||
fail_msg: ERROR - Remote version is lower then current version!
|
||||
|
||||
- name: Show Download URLs # noqa: H500
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ item }}"
|
||||
|
|
|
@ -40,6 +40,12 @@
|
|||
gitea_version_target: "{{ gitea_version }}"
|
||||
when: gitea_version != "latest"
|
||||
|
||||
- name: 'Assert that remote version is higher'
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- gitea_active_version is version(gitea_remote_version, 'lt')
|
||||
fail_msg: ERROR - Remote version is lower then current version!
|
||||
|
||||
- name: "Generate gitea download URL"
|
||||
ansible.builtin.set_fact:
|
||||
gitea_dl_url: "https://github.com/go-gitea/gitea/releases/download/v{{ gitea_version_target }}/gitea-{{ gitea_version_target }}-linux-{{ gitea_arch }}"
|
||||
|
|
Loading…
Reference in a new issue