Atleta-network / atleta

GNU General Public License v3.0
7 stars 4 forks source link

Notify when we need to update chain spec #92

Open ales-tsurko opened 1 month ago

ales-tsurko commented 1 month ago

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 with chain_spec.rs (if chain-spec.json is older, it's outdated), but it can have false positives and update chain_spec.rs not always means the chain spec have changed for one or another network configuration variant.

hrls commented 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
hrls commented 1 month ago

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.