Skip to main content

mr resource versions-compare

Compare two versions of a Resource and report the size delta, whether the content hashes match, whether the content types match, and the dimension differences. Both --v1 and --v2 are required and must be version IDs of the same Resource.

Usage

mr resource versions-compare <resource-id>

Positional arguments:

  • <resource-id>

Examples

Compare two versions (table)

mr resource versions-compare 42 --v1 17 --v2 21

Extract sameHash via jq

mr resource versions-compare 42 --v1 17 --v2 21 --json | jq -r .sameHash

Flags

FlagTypeDefaultDescription
--v1uint0First version ID (required) (required)
--v2uint0Second version ID (required) (required)

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Comparison object with sizeDelta, sameHash, sameType, dimensionsDiff

Exit Codes

0 on success; 1 on any error

See Also