2023-03-10 21:34:57 +03:00
2023-03-10 21:34:57 +03:00
2023-03-10 21:34:57 +03:00
2023-03-31 15:53:43 +03:00

Project Manager

Install

pip install project-manager -i https://instreamatic.com/nexus/repository/pypi/simple/

Usage

Show tasks list

pm [-v] [-vv]

Run task

pm <task> [-v] [-vv]

Presets locations

  • default presets $PROJECT_MANAGER/project_manager/preset/default/*.toml
  • user preset $HOME/.preset.toml
  • project preset ./.preset.toml

Preset format

Template

[presets.<entry_type>.tasks.<task_name>.<tag>]
conditions = ["<condition>"]
commands = ["<command>"]

Copy default config sample

[presets.config.tasks.setup.config]
conditions = ["file(config/base.yaml)", "file(config/current.yaml) | not"]
commands = ["cp ../../config/admin/dev/localhost.yaml config/current.yaml"]

Condition pipe format

function_name1(arg1,arg2) | function_name2(arg1)

Condition functions

  • file: file(filename) - check file/directory exists or load file content as dict for next pipe
  • get: get(keypath) - get value from dict by key path with dot separator
  • not: not - invert pipe value as bool
  • equal: equal(string) - compare pipe value with string
  • search: search(regexp, [index=1]) - match pipe value with regexp and return matched group by index (default 1)
S
Description
No description provided
Readme
648 KiB
Languages
Python 100%