particle-os-cli/src
Hikari 0d8fd93917
feat: snippets (#51)
## Goals

This PR adds snippets which is being discussed in #41 .

It will generate snippet lines for *ONLY* our containerfile module

- [x] allow for modules to specify snippets
- [x] append snippets to module run inside Containerfile
- [ ] write supporting test

## Preview
Recipe.yml

```yml
# image will be published to ghcr.io/<user>/<name>
name: orora

description: A starting point for further customization of uBlue images. Make your own! https://ublue.it/making-your-own/

base-image: ghcr.io/ublue-os/silverblue-main
image-version: latest # latest is also supported if you want new updates ASAP

modules:
  - type: signing
    snippets:
      - COPY --from=ghcr.io/blue-build/cli:latest-installer /out/BLUEBUILD /usr/bin/BLUEBUILD
```

Generated Container File snippet

```docker
RUN chmod +x /tmp/modules/signing/signing.sh && source /tmp/exports.sh && /tmp/modules/signing/signing.sh '{"type":"signing","snippets":["COPY --from=ghcr.io/blue-build/cli:latest-installer /out/BLUEBUILD /usr/bin/BLUEBUILD"]}'
COPY --from=ghcr.io/blue-build/cli:latest-installer /out/BLUEBUILD /usr/bin/BLUEBUILD
```

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-02-07 18:03:26 +00:00
..
bin refactor!: rename bb to bluebuild (#50) 2024-02-06 19:55:38 -05:00
commands feat: snippets (#51) 2024-02-07 18:03:26 +00:00
commands.rs feat: snippets (#51) 2024-02-07 18:03:26 +00:00
constants.rs feat: Allow default recipe path (#45) 2024-02-04 12:45:20 -06:00
lib.rs chore: Update README to show github action use 2024-02-05 20:52:36 -05:00
module_recipe.rs feat: snippets (#51) 2024-02-07 18:03:26 +00:00
ops.rs feat: snippets (#51) 2024-02-07 18:03:26 +00:00