Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[1.1.1] - 2018-11-27¶
Fixed¶
- Astrality now cleans up directories created by the compile, stow, symlink and copy actions when modules are cleaned up with the –cleanup flag.
[1.1.0] - 2018-06-24¶
Changed¶
- Astrality no longer reverts to using the example configuration when
ASTRALITY_CONFIG_HOME/astrality.ymldoes not exist. Default values are are used instead, and a warning is logged. Use--create-example-configto get create the example configuration instead. - GitHub modules are now cloned to
$XDG_DATA_HOME/astrality/repositories/githubinstead of$ASTRALITY_CONFIG_HOME/<modules_directory>.
[1.0.3] - 2018-06-17¶
Changed¶
- Astrality is now marked as “production/stable” on PyPI.
Fixed¶
- Fixed bug which caused
$ASTRALITY_LOGGING_LEVELandastrality -l <logging_level>to be ignored. - Astrality now catches errors caused by starting the file system watcher. It logs the error and continues on without watching the error in such a case.
[1.0.2] - 2018-05-25¶
Fixed¶
- Fixed lint errors in documentation which caused incorrect rendering on PyPI.
[1.0.0] - 2018-05-24¶
Added¶
- New
symlinkaction type. - New
copyaction type. - New
stowaction type. This action allows you to either compile+symlink or compile+copy, bisecting a directory based on filename regular expression matching. - You can now compile all templates recursively within a directory. Just set
contentto a directory path.targetmust be a directory as well, and the relative file hierarchy is preserved. - You can now specify which filenames are considered templates when compiling directories recursively.
- Template target filenames can now be renamed by specifying a regular expression capture group.
- Non-template files can now be either symlinked, copied, or ignored.
- The run action now supports
timeoutoption, in order to setrun_timeouton command-by-command basis. compileactions now support an optionalpermissionsfield for setting the permissions of the compiled template. It allows setting octal values such as'755', and uses the UNIXchmodAPI.- Module requirements can now specify required programs and environment
variables by using the dictionary keys
installedandenvrespectively. - You can now set
requirestimeout on a case-by-case basis. - Add new
--moduleCLI flag for running specific modules. on_startupblocks can now optionally be implicitly defined at the root indentation level in the module.- You can now run astrality with
--dry-runin order to check which actions that will be executed. - Modules can now depend on other modules with the
modulerequires keyword. - Modules can now place action in a
setupblock, only to be executed once. - You can now execute
astrality --reset-setup module_namein order to clear executed module setup actions. - Files created by
compile,copy,stow, andsymlinkactions are now persisted and cleaned up when executingastrality --cleanup MODULE. Files that are overwritten by Astrality are backed up and restored on clean up.
Changed¶
astrality.ymlhas now been split into three separate files:astrality.ymlfor global configuration options,modules.ymlfor global modules, andcontext.ymlfor global context.Directory module config file
config.ymlhas been renamed and split intomodules.ymlandcontext.yml. See point above.The
runmodule action is now a dictionary instead of a string. This enables us to support additional future options, such astimeout. Now you specify the shell command to be run as a string value keyed toshell.Old syntax:
run: - command1 - command2
New syntax:
run: - shell: command1 - shell: command2
The
triggermodule action is now a dictionary instead of a string. Now you specify the block to be triggered as a string value keyed toblock.on_modifiedblocks need to supply an additionalpathkey indicating which file modification block to trigger.Old syntax
trigger: - on_startup - on_modified:path/to/file
New syntax:
trigger: - block: on_startup - block: on_modified path: path/to/file
Template metadata is now copied to compilation targets, including permission bits. Thanks to @sshashank124 for the implementation!
The
triggeraction now follows recursivetriggeractions. Beware of circular trigger chains!recompile_modified_templateshas been renamed toreprocess_modified_files, as this option now also includes copied files.Astrality will now only recompile templates that have already been compiled when
reprocess_modified_filesis set totrue.The
templatecompile action keyword has now been replaced withcontent. This keyword makes more sense when we add support for compiling all templates within a directory. It also stays consistent with the new action types that have been added.Old syntax
compile: - template: path/to/template
New syntax:
compile: - content: path/to/template
The module list items within the module
requiresoption is now a dictionary, where shell commands are specified under theshellkeyword. This allows other requirement types (see Added section).Old syntax
requires: - './shell/script.sh'
New syntax:
requires: - shell: './shell/script'
Astrality now automatically quits if there is no reason for it to continue running.
When no compilation target is specified for a compile action, Astrality now creates a deterministic file within
$XDG_DATA_HOME/astrality/compilationsto be used as the compilation target. This behaves better than temporary files when programs expect files to still be present after Astrality restarts.Astrality is now more conservative when killing duplicate Astrality processes by using a pidfile instead of
pgrep -f astrality.
Fixed¶
- If a
import_contextaction imported specifiedfrom_sectionbut notto_section, the section was not imported at all. This is now fixed by settingto_sectionto the same asfrom_section. - Template path placeholders are now normalized, which makes it possible to
refer to the same template path in different ways, using symlinks and
..paths. - Module option
requires_timeoutis now respected. - Astrality no longer kills processes containing “astrality” in their command line invocation.