Clean-up packaged examples

Summary:
The snapshot files now have identical names each time they are generated. Also,
all unnecessary directories (like `auth`) are removed from the examples
automatically.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2747
This commit is contained in:
Matej Ferencevic 2020-04-02 14:24:06 +02:00
parent df72723664
commit 66e644551f

View File

@ -71,4 +71,19 @@ do
# abort
exit $code
fi
pushd "$script_dir/$snapshots_dir/" >/dev/null
# remove all unnecessary directories
for name in *; do
if [ "$name" == "snapshots" ]; then
continue
fi
rm -r "$name"
done
# rename the generated snapshot file
mv snapshots/* snapshots/$example
popd >/dev/null
done