Open ales-tsurko opened 1 month ago
Something like this?
diff \
<(atleta-node build-spec --chain testnet | jq --sort-keys) \
<(cat chainspecs/_spec_file_.json | jq --sort-keys)
echo $? # 0 indicates the same files, 1 – different
Or we can pull out specs files from the repo sources and put them into GitHub artifacts. Artifacts are available via a direct link, and we can add some script to download them. IMO any post-build output in a repo is in some way a mess.
As we now use chain specs exported to json, we need some mechanism to detect when we need to update the files. One possible solution is using git hook to compare
chain-spec.json
files withchain_spec.rs
(ifchain-spec.json
is older, it's outdated), but it can have false positives and updatechain_spec.rs
not always means the chain spec have changed for one or another network configuration variant.