Class ReleaseRecordFile
java.lang.Object
network.ike.workspace.ReleaseRecordFile
Reads and writes
releases/release-<cycle>.yaml — the on-disk
form of a ReleaseRecord (IKE-Network/ike-issues#973).
Unlike ManifestWriter, which performs comment-preserving
surgical edits on the hand-maintained workspace.yaml, the
release record is machine-owned (ws:record-release writes it,
nothing hand-edits it), so this class renders the whole file from the
model on every write — symmetric read/write over one canonical form,
in the style of the checkpoint YAML files.
Scalar values that could parse as non-string YAML types (versions, shas, dates) are written quoted so a read-back always yields strings.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PathThe canonical record path for a cycle:<root>/releases/release-<cycle>.yaml.static ReleaseRecordRead a release record from disk.static voidwrite(Path path, ReleaseRecord record) Write a release record to disk, creating thereleases/directory when absent.
-
Method Details
-
pathFor
The canonical record path for a cycle:<root>/releases/release-<cycle>.yaml.- Parameters:
workspaceRoot- the workspace root directorycycle- the cycle label, e.g.komet-wsr-1- Returns:
- the record file path
- Throws:
ManifestException- ifcycleis null or blank
-
read
Read a release record from disk.- Parameters:
path- the record file path- Returns:
- the parsed record
- Throws:
ManifestException- if the file cannot be read, is not a YAML map, or failsReleaseRecordvalidation
-
write
Write a release record to disk, creating thereleases/directory when absent. The rendered form is deterministic for a given record, so re-writing an unchanged record is byte-stable.- Parameters:
path- the record file pathrecord- the record to render- Throws:
IOException- if the directory or file cannot be written
-