Skip to content

Commit 3afcf99

Browse files
committed
feat: add custom image labels via CLI
- New `--label KEY=VALUE` CLI flag (repeatable) for adding custom OCI image config labels - New `-l` short alias for `--label` - CLI labels override config labels from rebar.config or mix.exs - Shared `parse_cli_kv_list/2` helper eliminates code duplication - Added `ocibuild_validate.erl` module for shared validation (null bytes, path traversal) - Updated documentation and version to 0.10.0 Closes #39
1 parent 9ca21bd commit 3afcf99

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ src/
9494
├── ocibuild_digest.erl # SHA256 digest utilities
9595
├── ocibuild_json.erl # JSON encode/decode (OTP 27 native + fallback)
9696
├── ocibuild_time.erl # Timestamp utilities (SOURCE_DATE_EPOCH)
97+
├── ocibuild_validate.erl # Shared validation (null bytes, path traversal)
9798
└── ocibuild_progress.erl # Progress reporting
9899
99100
lib/

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# Changelog
22

3-
## [Unreleased]
3+
## 0.10.0 - 2026-01-15
44

55
### Breaking Changes
66

77
- **Removed `--desc` CLI option and `description` config option**: Use `--annotation "org.opencontainers.image.description=Your description"` or the `annotations` config map instead. This consolidates description handling into the more flexible annotations system.
88

99
### Features
1010

11+
- **Custom image labels** ([#39](https://github.com/intility/erlang-oci-builder/issues/39)):
12+
- New `--label KEY=VALUE` CLI flag (repeatable) for adding custom OCI image config labels
13+
- New `-l` short alias for `--label`
14+
- CLI labels override config labels from rebar.config or mix.exs
15+
- Shared `parse_cli_kv_list/2` helper eliminates code duplication between annotation and label parsing
16+
1117
- **Custom manifest annotations** ([#37](https://github.com/intility/erlang-oci-builder/issues/37)):
1218
- New `--annotation KEY=VALUE` CLI flag (repeatable) for adding custom OCI manifest annotations
1319
- New `-a` short alias for `--annotation`

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ src/
9595
├── ocibuild_digest.erl → SHA256 utilities
9696
├── ocibuild_json.erl → JSON encode/decode
9797
├── ocibuild_time.erl → Timestamp utilities
98+
├── ocibuild_validate.erl → Shared validation (null bytes, path traversal)
9899
└── ocibuild_progress.erl → Progress reporting
99100
100101
lib/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ It works from any BEAM language (Erlang, Elixir, Gleam, LFE) and has no dependen
4040

4141
```erlang
4242
{project_plugins, [
43-
{ocibuild, "~> 0.9"}
43+
{ocibuild, "~> 0.10"}
4444
]}.
4545
```
4646

@@ -49,7 +49,7 @@ It works from any BEAM language (Erlang, Elixir, Gleam, LFE) and has no dependen
4949
```elixir
5050
def deps do
5151
[
52-
{:ocibuild, "~> 0.9", runtime: false}
52+
{:ocibuild, "~> 0.10", runtime: false}
5353
]
5454
end
5555
```
@@ -63,7 +63,7 @@ The easiest way to use `ocibuild` with Elixir:
6363
```elixir
6464
# mix.exs
6565
def deps do
66-
[{:ocibuild, "~> 0.9", runtime: false}]
66+
[{:ocibuild, "~> 0.10", runtime: false}]
6767
end
6868

6969
def project do
@@ -116,7 +116,7 @@ The easiest way to use `ocibuild` with Erlang:
116116

117117
```erlang
118118
%% rebar.config
119-
{project_plugins, [{ocibuild, "~> 0.9"}]}.
119+
{project_plugins, [{ocibuild, "~> 0.10"}]}.
120120

121121
{ocibuild, [
122122
{base_image, "debian:stable-slim"},

src/ocibuild.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{application, ocibuild, [
22
{description, "Build and publish OCI container images from the BEAM"},
3-
{vsn, "0.9.1"},
3+
{vsn, "0.10.0"},
44
{registered, []},
55
{applications, [kernel, stdlib, crypto, ssl, inets]},
66
{env, []},

0 commit comments

Comments
 (0)