Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
RFC: use otk files instead of otk.arguments
Browse files Browse the repository at this point in the history
The use-case given (and maybe I'm missing other use-cases here) for
the otk.arguments is currently "version" and "architecture".

We could do this instead via a `fedora-39-amd64.yaml` file that
just define those arguments. The upside of this is that we can
easily see what combinations of version and architecture we
support by looking at the top-level dir. It also simplifies the
spec and we would not have to worry about validating arguments,
i.e. how do we know that "-Dversion=41" is valid or not (if not
valid it would probably mean down the line an include based on
the version cannot be found and that presents challenges for a
nice error message).

It would also allow us to have symlinks when things do not change,
e.g.
```
rhel-9.3.yaml -> rhel-9.4.yaml
```

But maybe I'm missing another use case for this? Even then I think
the `fedora/39-amd64.yaml` has some merrits and is worth considering.
  • Loading branch information
mvo5 authored and supakeen committed Apr 15, 2024
1 parent e4c82c7 commit 6e2206e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
13 changes: 0 additions & 13 deletions doc/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ otk.define:
boot_mode: uefi
```
## otk.argument
Define arguments that **MUST** be passed on the command line to `otk` with
`otk compile -A`.

Expects a `seq` for its value.

```yaml
otk.argument:
- version
- architecture
```

## Usage of `${}`

Use a previously defined variable. String values can be used inside other
Expand Down
6 changes: 6 additions & 0 deletions example/fedora/fedora-39-amd64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
otk.define:
version: 39
architecture: amd64

otk.include:
path: minimal.yaml
4 changes: 0 additions & 4 deletions example/fedora/minimal.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
otk.version: 1

otk.argument:
- version
- architecture

otk.include:
path: repositories/${version}.yaml

Expand Down

0 comments on commit 6e2206e

Please sign in to comment.