File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments