Merge pull request #107282 from 0x4A6F/master-dasel

dasel: add installCheckPhase test
This commit is contained in:
Lassulus 2020-12-28 17:34:18 +01:00 committed by GitHub
commit 4b210ca92a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,17 @@ buildGoModule rec {
-ldflags=-s -w -X github.com/tomwright/dasel/internal.Version=${version}
'';
doInstallCheck = true;
installCheckPhase = ''
if [[ "$("$out/bin/${pname}" --version)" == "${pname} version ${version}" ]]; then
echo "" | $out/bin/dasel put object -p yaml -t string -t int "my.favourites" colour=red number=3 | grep -q red
echo '${pname} smoke check passed'
else
echo '${pname} smoke check failed'
return 1
fi
'';
meta = with stdenv.lib; {
description = "Query and update data structures from the command line";
longDescription = ''