* Simplify score_file() by using case in instead of nested ifs with regexps.
* Merge record_score() and record_template().
* Alt condition processing no longer stops when a template condition is seen
but continues processing to verify that all conditions are valid (as the
documentation says it should). Fixes#478.
* Support alt dirs with deeply nested tracked files (fixes#490).
* Use git ls-files to filter out which tracked files to consider for alt
processing. Should speed up auto-alt (#505).
* Use nocasematch when comparing distro and distro_family. Fixed#455.
* Update base image to Ubuntu 24.10. This uses a python version where j2cli no
longer works when installed using pip so use the version from Ubuntu instead
which has been patched to work.
* Update shellcheck, pylint, pytest, isort, flake8, black and yamllint to the
latest versions. This closes#502.
* Use a longer expect timeout to fix tests failing when gpg is killed due to
this timeout.
* Explicitly flush gpg-agent's cached passwords to fix failing tests with
latest gnupg. Also clean up after tests to avoid having gpg-agents running
after the test (e.g. when running tests directly without docker).
* Support nested ifs in default template (#436)
* Support include and ifs in default template includes (#406)
* Support environment variables in ifs in default template (#488)
* Support != in default template (#358, #477)
* Fix multiple classes in default template on macOS (#437)
The awk script now performs all processing in the BEGIN block using an
implementation that is capable of handling if statements which contain nested
if statments (fixes#436). To make nested ifs look better, if, else and endif
lines can now have optional whitespace before {%.
Includes are now handled in the same way as the main file which means that
included files can both include other files and have if statements in addition
to variables (fixes#406). Include lines can now also have optional whitespace
before {%.
All variables are handled in the same way now so it's now possible to use env
variables in if statements (fixes#488).
Also add support for != in addition to == (fixes#358). Thus it's now
e.g. possible to check if a variable is set (#477) by doing:
{% if yadm.class != ""%}
Class is set to {{ yadm.class }}
{% endif %}
A non-existing yadm or env variable is now replaced with the empty string.
Whenever using `clone` command inside YADM_WORK sub-directory, we need
to checkout the correct repo contents.
Steps to reproduce:
```bash
mkdir $HOME/subdir
cd $HOME/subdir
yadm clone --bootstrap "<repo-url>"
yadm status
```
Improvements include:
1. Skip writing a temporary file if the file contents are unchanged
2. Better error reporting if templating program fails
3. Better error reporting/handling if file creation, mv, or chmod fail
4. Quiet logs by not outputing "Creating output..." line twice (debug & loud)
The new test Docker image has a newer gnupg which does not behave the
same way, handling invalid passwords. This type of error is simulated
using an ICP error in the pinentry protocol.