From 33fbebb6ae714b7a1c133b0bc7a9d8f72125829a Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Tue, 4 Jun 2024 15:50:38 -0400 Subject: [PATCH] Fix and improve the tash demo script --- tash/hack/demo.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tash/hack/demo.sh b/tash/hack/demo.sh index 93c6c19..da402ac 100755 --- a/tash/hack/demo.sh +++ b/tash/hack/demo.sh @@ -1,4 +1,15 @@ #!/bin/bash -DEBUG=1 go run .. git-clone-recipe.yaml -diff git-clone.yaml* +# With an empty recipe we just do canonical formatting of the input. +# Do this so we get a more meaningful diff below. +yq '{"base": .base}' git-clone-recipe.yaml >empty-recipe.yaml +DEBUG=1 go run .. empty-recipe.yaml >git-clone-a.yaml + +# The real recipe +DEBUG=1 go run .. git-clone-recipe.yaml >git-clone-b.yaml + +# Set DIFF=vimdiff if you like vimdiff +${DIFF:-diff} git-clone-a.yaml git-clone-b.yaml + +# Use this to see the raw diff +#${DIFF:-diff} $(yq .base git-clone-recipe.yaml) git-clone-b.yaml