Skip to content

Commit

Permalink
update project workflow readme
Browse files Browse the repository at this point in the history
  • Loading branch information
blooop committed Sep 19, 2024
1 parent dcb1135 commit 6fe9d46
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,29 @@ $ pixi run arbitrary_task

# Adding Functionality

1. Rename template_rocker/rocker_extension.py and the class inside to something more appropriate
1. Rename template_rocker/new_rocker_extension.py and the class inside to something more appropriate
2. Update the extension entrypoint in `pyproject.toml`

`[project.entry-points."rocker.extensions"]`

`rocker_extension = "template_rocker.rocker_extension:NewRockerExtension"`
3. Add/update the docker snippets in the templates folder. Officially the extension is supposed to be .Dockerfile.em to indicate its passed to the empy library, but I have left them as .Dockerfile as I get Dockerfile highlighting out of the box that way.
4. Develop your extension. I find that using `pip install -e .` and running the extension with rocker on my host system is the easiest way to get started.
`new_rocker_extension = "template_rocker.new_rocker_extension:NewRockerExtension"`


e.g.:
`lazygit = "lazygit_rocker.lazygit_rocker:LazygitExtension"`


3. Update the `get_name()` function in the extension class. e.g. Updating the name to `lazygit` would mean that it would be activated by passing --lazygit to rocker

4. Add/update the docker snippets in the templates folder. Officially the extension is supposed to be .Dockerfile.em to indicate its passed to the empy library, but I have left them as .Dockerfile as I get Dockerfile highlighting out of the box that way.
5. Develop your extension. I find that using `pip install -e .` and running the extension with rocker on my host system is the easiest way to get started.

```bash
rocker --lazygit ubuntu:22.04

#check that everything works as expected
```



## Troubleshooting
Expand Down

0 comments on commit 6fe9d46

Please sign in to comment.