Shell escaping, sensitive value redaction, and general utilities.
Summary
Functions
Build an env var assignment string: KEY=value (shell-escaped).
Check if the git working tree has uncommitted or staged changes.
Generate a short git SHA for versioning.
Optionally mask a value if it matches a sensitive env var name.
Parse a "host:port" string or just "host" into {host, port}.
Redact sensitive values from a string for display. Replaces values of env vars matching sensitive patterns with [REDACTED].
Escape a value for safe use in shell commands. Uses single-quoting with internal single quotes escaped.
Convert an underscored release name to a PascalCase module name.
Convert a service name to a valid release/app name (underscored).
Generate a version string from git. Uses git SHA, falls back to timestamp.
Functions
Build an env var assignment string: KEY=value (shell-escaped).
Check if the git working tree has uncommitted or staged changes.
Generate a short git SHA for versioning.
Optionally mask a value if it matches a sensitive env var name.
Parse a "host:port" string or just "host" into {host, port}.
Redact sensitive values from a string for display. Replaces values of env vars matching sensitive patterns with [REDACTED].
Escape a value for safe use in shell commands. Uses single-quoting with internal single quotes escaped.
Convert an underscored release name to a PascalCase module name.
iex> Xamal.Utils.to_module_name("my_app")
"MyApp"
Convert a service name to a valid release/app name (underscored).
Generate a version string from git. Uses git SHA, falls back to timestamp.