run 'just versions' and 'just opml' only when 'just update' has '-u' flag

This commit is contained in:
Aine 2024-08-14 11:31:49 +03:00
parent 8a58862525
commit a1f2b59b9b
No known key found for this signature in database
GPG key ID: 34969C908CCA2804

View file

@ -77,8 +77,6 @@ update *flags: update-playbook-only
if [ -x "$(command -v agru)" ]; then
echo {{ if flags == "" { "Installing roles pinned in requirements.yml..." } else if flags == "-u" { "Updating roles and pinning new versions in requirements.yml..." } else { "Unknown flags passed" } }}
agru -r {{ templates_directory_path }}/requirements.yml {{ flags }}
just --justfile {{ justfile() }} versions
just --justfile {{ justfile() }} opml
else
echo "[NOTE] You are using the standard ansible-galaxy tool to install roles, which is slow and lacks other features. We recommend installing the 'agru' tool to speed up the process: https://github.com/etkecc/agru#where-to-get"
echo "Installing roles..."
@ -86,6 +84,11 @@ update *flags: update-playbook-only
ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force
fi
if [[ "{{ flags }}" == "-u" ]]; then
just --justfile {{ justfile() }} versions
just --justfile {{ justfile() }} opml
fi
# Updates the playbook without installing/updating Ansible roles
update-playbook-only:
@echo "Updating playbook..."