leo/.circleci/leo-clean.sh

29 lines
452 B
Bash
Raw Normal View History

2022-08-05 21:30:53 +03:00
# Create a new Leo program named `foo`.
2023-02-16 19:49:13 +03:00
$LEO new foo || exit
2021-02-25 08:45:06 +03:00
ls -la
2022-08-05 21:14:58 +03:00
cd foo && ls -la
2021-02-25 08:45:06 +03:00
# Run `leo run`.
$LEO run || exit
2021-02-25 08:45:06 +03:00
2022-08-05 21:30:53 +03:00
# Assert that the 'build' folder exists.
if [ "$(ls -A build)" ]; then
echo "build is not empty"
2021-02-25 08:45:06 +03:00
else
2022-08-05 21:30:53 +03:00
echo "build is empty"
2021-02-25 08:45:06 +03:00
exit 1
fi
2022-08-05 21:30:53 +03:00
# Run `leo clean`
2023-02-16 19:49:13 +03:00
$LEO clean || exit
2022-07-19 04:28:23 +03:00
2022-08-05 21:30:53 +03:00
# Assert that the 'build' folder is empty.
2022-07-19 04:28:23 +03:00
if [ "$(ls -A build)" ]; then
echo "build is not empty"
exit 1
else
echo "build is empty"
2021-02-25 08:45:06 +03:00
exit 0
fi
2022-07-19 04:28:23 +03:00