Skip to content

Commit 92a859d

Browse files
chore: dependancy layer fix
1 parent 5784db6 commit 92a859d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/cdk_package_code.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ jobs:
6666
6767
- name: Build Python Lambda Functions
6868
run: |
69-
poetry export --without-hashes --format=requirements.txt --with slackBotFunction > requirements_slackBotFunction
70-
poetry export --without-hashes --format=requirements.txt --with syncKnowledgeBaseFunction > requirements_syncKnowledgeBaseFunction
71-
if [ ! -s requirements_slackBotFunction ]; then \
72-
echo "Error: requirements_slackBotFunction is empty or missing"; \
69+
poetry export --without-hashes --format=requirements.txt --only=slackBotFunction > requirements_slackBotFunction || \
70+
poetry show --only=slackBotFunction | grep -E "^[a-zA-Z]" | awk '{print $1"=="$2}' > requirements_slackBotFunction
71+
poetry export --without-hashes --format=requirements.txt --only=syncKnowledgeBaseFunction > requirements_syncKnowledgeBaseFunction || \
72+
poetry show --only=syncKnowledgeBaseFunction | grep -E "^[a-zA-Z]" | awk '{print $1"=="$2}' > requirements_syncKnowledgeBaseFunction
73+
if [ ! -s requirements_slackBotFunction ] || [ "$(grep -c -v '^[[:space:]]*$' requirements_slackBotFunction)" -eq 0 ]; then \
74+
echo "Error: requirements_slackBotFunction is empty or contains only blank lines"; \
7375
exit 1; \
7476
fi
75-
if [ ! -s requirements_syncKnowledgeBaseFunction ]; then \
76-
echo "Error: requirements_syncKnowledgeBaseFunction is empty or missing"; \
77+
if [ ! -s requirements_syncKnowledgeBaseFunction ] || [ "$(grep -c -v '^[[:space:]]*$' requirements_syncKnowledgeBaseFunction)" -eq 0 ]; then \
78+
echo "Error: requirements_syncKnowledgeBaseFunction is empty or contains only blank lines"; \
7779
exit 1; \
7880
fi
7981
mkdir -p .dependencies/slackBotFunction/python

0 commit comments

Comments
 (0)