Commit Graph

10 Commits

Author SHA1 Message Date
Matej Janezic 73a0b87c31
feat: swap println for eprintln or debug_eprintln
Unified expected output to always eprintln so outputs can be piped to
other processes. Added debug_eprintln and switched all occurances of
debug_println.
2024-10-25 09:03:49 +02:00
Matej Janezic 316b37cd05
feat: custom command builder
Implemented custom command builder with nicer api suited for my needs.
Also returned error if there are no containers in
`scripts::postgres::get_containers`.
2023-06-02 17:18:25 +02:00
Matej Janezic e3306c494d
feat: prepulate command in make-command
Fixed bug where created command file didn't end with `.py` and
prepopulate created file with minimal example of django management command.
2023-06-02 17:16:15 +02:00
Matej Janezic 5d45eccfef
feat: add django test command
Added django's manage.py test command as a shortcut
2023-06-02 17:15:39 +02:00
Matej Janezic 251826c048
feat: print $DJANGO_SETTINGS_MODULE when it's needed 2023-06-02 17:07:13 +02:00
Matej Janezic de5e6b4d10
feat: rename commands and remove aliases in favour of completion
BREAKING CHANGE: changed commands as follows
D -> Docker
Dc -> Compose
Dj -> Django
Pg -> Postgres
2023-05-27 13:30:09 +02:00
Matej Janezic 423badfe07
fix: all django management command related subcommands
We just called `manage` inside docker instead of
`exec appserver python manage.py`. Now we make assumption that django
app is running in docker-compose in service named `appserver`.

While fixing this bug we also refactored for `shell`, `makemigrations`
and `migrate` to all call `manage` under the hood to avoid repeating code.
2023-05-24 00:21:04 +02:00
Matej Janezic 286e16e7ce
feat: finish django cli and add aliases
Implemented basic wanted functionality for django subcommands.

Added single or two letter aliases for all subsubcommands.
2023-05-23 22:49:18 +02:00
Matej Janezic 9f3cc86e3f
feat: add basic error handling
Add anyhow::Result<()> return signature to all scripts and main.
2023-05-21 23:47:02 +02:00
Matej Janezic eb232a93f8
feat: prepare initial cli layout
Made initial command scopes
d -> docker related commands
dc -> docker compose related commands
dj -> django related commands
pg -> postgres related commands
2023-05-21 22:40:34 +02:00