Skip to content

Commit

Permalink
chore: save off
Browse files Browse the repository at this point in the history
  • Loading branch information
nmccready committed Jul 11, 2024
1 parent c5a6536 commit e750450
Show file tree
Hide file tree
Showing 7 changed files with 5,786 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/gen_mocks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

# get calling Directory
ORIG_DIR="$(pwd)"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

cd "$SCRIPT_DIR"
cd ../

# Iterate over each local ./service directory
for service_dir in ./service/*; do
# and not the "internal" directory
if [ -d "$service_dir" ] && [ "$(basename "$service_dir")" != "internal" ]; then
mockery --dir "$service_dir" --name IClient --output "$service_dir/mocks"
fi
done

echo "Mocks generation complete."

cd "$ORIG_DIR"
Loading

0 comments on commit e750450

Please sign in to comment.