Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAN-16: Update the generate-cicd recipe to fail gracefully for missing library template #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ generate-cicd TARGET_DIR FLAG="":
mkdir -p ./generate/.output
envsubst < generate/config-template.json > generate/.config.json
cp ./generate/.openapi-generator-ignore ./generate/.output/.openapi-generator-ignore
cp ./generate/templates/description.{{APPLICATION_NAME}}.mustache ./generate/templates/description.mustache
# Basic check if file exists
if [ -f "./generate/templates/description.{{APPLICATION_NAME}}.mustache" ]; then
cp ./generate/templates/description.{{APPLICATION_NAME}}.mustache ./generate/templates/description.mustache
else
echo "No description template for {{ APPLICATION_NAME }} ... skipping."
fi

./generate/generate.sh ./generate ./generate/.output {{swagger_path}} .config.json
rm -f generate/.output/.openapi-generator-ignore
Expand Down Expand Up @@ -216,4 +221,4 @@ make-import-fix:
bash {{justfile_directory()}}/generate/fix-imports-for-access.sh \
{{justfile_directory()}}/generate/.output/sdk/finbourne_access/models/selector_definition.py \
"from finbourne_access.models.policy_selector_definition import PolicySelectorDefinition" \
"SelectorDefinition.update_forward_refs()"
"SelectorDefinition.update_forward_refs()"