class
Shards::PostinstallInfo
- Shards::PostinstallInfo
- Reference
- Object
Overview
Tracks postinstall script execution state across installs.
Persisted at lib/.shards.postinstall, this tracker stores a hash of
each shard's postinstall command and whether it has been executed.
This enables version-aware postinstall behavior:
- First install: run the script, record its hash
- Subsequent installs with same script: skip silently
- Script changed: warn the user, require explicit
shards run-script
Defined in:
postinstall_info.crConstant Summary
-
CURRENT_VERSION =
"1.0"
Constructors
Class Method Summary
-
.hash_script(command : String) : String
Computes a SHA-256 hash of a postinstall command string.
Instance Method Summary
-
#load
Loads tracker state from the YAML file at
#path. -
#path : String
Absolute path to the
.shards.postinstallfile. -
#save
Persists the current tracker state to the YAML file at
#path. -
#shards : Hash(String, Entry)
Map of shard name to its postinstall entry.
Constructor Detail
Class Method Detail
def self.hash_script(command : String) : String
#
Computes a SHA-256 hash of a postinstall command string.