diff --git a/.gitignore b/.gitignore index 8a52e8a..56bebff 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ *.test bin **/cmd -**/gen +services/**/gen api-cli # Output of the go coverage tool, specifically when used with LiteIDE diff --git a/scripts/gen b/scripts/gen new file mode 100755 index 0000000..635950c --- /dev/null +++ b/scripts/gen @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +GIT_ROOT=$(git rev-parse --show-toplevel) +pushd ${GIT_ROOT} + +echo "Generating Goa code..." + +for svc in front character item inventory; do + goa gen crossnokaye-interview-assignment/services/${svc}/design -o services/${svc} +done + +popd \ No newline at end of file