Class ManagedFileMarker
java.lang.Object
io.github.duckasteroid.gradle.versioning.releaseflow.ManagedFileMarker
The "# duckasteroid-managed: componentId version sha256:hash" marker comment that a
ManagedFileInstaller.install(...) call stamps as the first line of every file it
installs, and that a matching ManagedFileChecker.check(...) call later re-parses to
detect staleness/tampering. The hash covers everything BELOW the marker line (the templated
body), never the marker line itself - a self-attestation, not a tamper-proof checksum: it only
needs to catch the realistic accident (editing a step without touching the marker comment), not
someone deliberately recomputing a matching hash.
componentId namespaces the marker by whichever plugin/feature installed the file (e.g.
"release-flow") - installReleaseWorkflows is the only caller today, but
namespacing from the start means a second installer can never have its file misread as belonging
to a different component, or vice versa.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ManagedFileMarkerbooleanmatchesBody(String body) static ManagedFileMarkerParses a marker line, or returns null if it isn't one (foreign/hand-written file).render()static String
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
ManagedFileMarker
-
-
Method Details
-
getComponentId
-
getVersion
-
getSha256
-
render
-
matchesBody
-
forBody
-
sha256Of
-
parse
Parses a marker line, or returns null if it isn't one (foreign/hand-written file).
-