mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
42c74efbac
A local class is set with: $ yadm config local.class cls1 More classes can be added with: $ yadm config --add local.class cls2 $ yadm config --add local.class cls3 Any of cls1, cls2 and cls3 can be used in an alternate condition. For templates, the existing variable yadm.class/YADM_CLASS is set to the last class (i.e. cls3) to remain compatible with how it works today and with what the following command gives: $ yadm config local.class For the default template processor there is no explicit yadm.classes variable. Instead a yadm.class condition will check against all classes. For the other processors, a new template variable YADM_CLASSES will be set to all classes separated by newline. For jinja2 templates a class can be checked with: {%- if "cls" in YADM_CLASSES.split("\n") %} For esh templates the logic is a bit more complex, but it is possible to do. Fixes #185. |
||
---|---|---|
.. | ||
conftest.py | ||
Dockerfile | ||
ownertrust.txt | ||
pinentry-mock | ||
pylintrc | ||
requirements.txt | ||
test_alt_copy.py | ||
test_alt.py | ||
test_assert_private_dirs.py | ||
test_bootstrap.py | ||
test_clean.py | ||
test_clone.py | ||
test_config.py | ||
test_encryption.py | ||
test_enter.py | ||
test_ext_crypt.py | ||
test_git.py | ||
test_help.py | ||
test_hooks.py | ||
test_init.py | ||
test_introspect.py | ||
test_key | ||
test_list.py | ||
test_perms.py | ||
test_syntax.py | ||
test_unit_bootstrap_available.py | ||
test_unit_choose_template_cmd.py | ||
test_unit_configure_paths.py | ||
test_unit_copy_perms.py | ||
test_unit_encryption.py | ||
test_unit_exclude_encrypted.py | ||
test_unit_issue_legacy_path_warning.py | ||
test_unit_parse_encrypt.py | ||
test_unit_private_dirs.py | ||
test_unit_query_distro.py | ||
test_unit_record_score.py | ||
test_unit_record_template.py | ||
test_unit_relative_path.py | ||
test_unit_remove_stale_links.py | ||
test_unit_report_invalid_alts.py | ||
test_unit_score_file.py | ||
test_unit_set_local_alt_values.py | ||
test_unit_set_os.py | ||
test_unit_set_yadm_dir.py | ||
test_unit_template_default.py | ||
test_unit_template_esh.py | ||
test_unit_template_j2.py | ||
test_unit_upgrade.py | ||
test_unit_x_program.py | ||
test_upgrade.py | ||
test_version.py | ||
utils.py |