depot/third_party/nixpkgs/pkgs/by-name/ku/kubo/test-repoVersion.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

13 lines
446 B
Nix

{ runCommand, kubo }:
runCommand "kubo-test-repoVersion" { } ''
export IPFS_PATH="$TMPDIR"
"${kubo}/bin/ipfs" init --empty-repo
declared_repo_version='${kubo.repoVersion}'
actual_repo_version="$(cat "$IPFS_PATH/version")"
if [ "$declared_repo_version" != "$actual_repo_version" ]; then
echo "kubo.repoVersion is not set correctly. It should be $actual_repo_version but is $declared_repo_version."
exit 1
fi
touch "$out"
''