Skip to content

v0.35.0

Choose a tag to compare

@github-actions github-actions released this 06 Dec 17:05
· 2 commits to main since this release
c8b894c

Features

  • Added mani project tag add <tags> [project...], mani project tag rm <tags> [project...] and mani project tag clear <tags>, to add tags to projects of the config and remove them (several separated by commas, active,wip), the project of the current directory when none is given. Only the line of the tag is written: the comments in a list of tags are kept, and a list without tags left is removed. A project keeps the tags that other configs that define it give it, which is shown, and rm and clear warn when a target or a task selects a tag that no project has any longer #56
  • A reference to a task in commands: takes an env: of its own (- task: checkout with env: {branch: main}), which overrides the env of the referenced task and of the task that references it, and a name, desc, shell and tty of its own: name, desc and shell override those of the referenced task, and tty: true runs it with a TTY, as on an inline command. They were ignored.
  • Shell completion of mani run <task> suggests the variables of the task, as name= with the value the task gives them, so they can be set on the command line (mani run checkout branch=dev). The variables of a task are those of its env and of the env of its commands #110
  • An Overview button in the TUI, next to Help, shows the config files that are read (the config, the user config and the imports), and how many projects, tasks, tags, paths, specs, targets, themes and env variables there are
  • The panes of the TUI show how many items a filter leaves, out of how many there are: Projects (3/10). They showed the number of all items
  • Shell completion of project names shows their desc, for describe projects, list projects, edit project, project rm, sync, and --projects of run and exec, as the completion of task names for run did. So does the completion of task names for describe tasks, list tasks and edit task

Breaking

  • A reference to a task (commands: - task: <name>) without a cmd, or with commands:, is an error, which stops every command from loading the config, as a reference to a task that doesn't exist does. It ran only the cmd of the task without a word: an empty command, which did nothing, or the cmd without the commands. Reference a task with a cmd and no commands:, or list its commands.
  • An inline command of commands: without a shell is run with the shell of its task, which is the shell of the config unless the task has one: it was run with bash. Set shell: bash on a command that needs bash.

Fixes

  • An env that is not a mapping of names to values (env: [branch=main]), of the config, a task, a command or a reference to a task, is a config error: mani panicked
  • The env of a task that is referenced with commands: - task: <name> gives defaults, which the env of the task that references it overrides #128. This changes what v0.33.0 and v0.34.0 do, where the referenced task's own env took precedence: a variable that both tasks set now has the value of the task that references it, as before v0.33.0, which dropped the referenced task's env.
  • mani run a b runs the commands of a task with commands: with the env of that task: they were run without it. A task with both cmd and commands: runs both, as on its own: its commands were left out
  • A task referenced with commands: - task: <name> without a shell is run with the shell of the config, as it is on its own: it was run with bash when it was defined after the task that references it
  • A desc of more than one line, of a task, broke the shell completion of task names: each of its lines was a completion. A completion shows the first line of the desc
  • A config whose tasks reference other tasks (commands: - task: <name>) loads faster: the time grew with the square of the number of tasks, as each reference copied every task it looked at. With 4,000 tasks, every command took 0.65s to read the config, and now takes 0.09s
  • A command with tty: true (or --tty) runs in the directory of the project, with the env of the project, as a command without a TTY does: it ran in the directory mani was run from, without the project's env, so -p <project> had no effect on it. On Windows, a command with a TTY still isn't run
  • --dry-run shows a command with tty: true (or --tty) instead of running it, and a TTY command that can't be run, in a project whose directory doesn't exist (with ignore_non_existing), shows why