|
30 | 30 | id: asdf-version |
31 | 31 | run: echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT" |
32 | 32 |
|
33 | | - |
34 | 33 | # using git commit sha for version of action to ensure we have stable version |
35 | 34 | - name: Install asdf |
36 | 35 | uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302 |
@@ -67,16 +66,18 @@ jobs: |
67 | 66 |
|
68 | 67 | - name: Build Python Lambda Functions |
69 | 68 | run: | |
70 | | - poetry export --without-hashes --format=requirements.txt --with slackBotFunction > requirements_slackBotFunction |
71 | | - poetry export --without-hashes --format=requirements.txt --with syncKnowledgeBaseFunction > requirements_syncKnowledgeBaseFunction |
72 | | - if [ ! -s requirements_slackBotFunction ]; then \ |
73 | | - echo "Error: requirements_slackBotFunction is empty or missing"; \ |
| 69 | + poetry show --only=slackBotFunction | grep -E "^[a-zA-Z]" | awk '{print $1"=="$2}' > requirements_slackBotFunction |
| 70 | + poetry show --only=syncKnowledgeBaseFunction | grep -E "^[a-zA-Z]" | awk '{print $1"=="$2}' > requirements_syncKnowledgeBaseFunction |
| 71 | + if [ ! -s requirements_slackBotFunction ] || [ "$(grep -c -v '^[[:space:]]*$' requirements_slackBotFunction)" -eq 0 ]; then \ |
| 72 | + echo "Error: requirements_slackBotFunction is empty or contains only blank lines"; \ |
74 | 73 | exit 1; \ |
75 | 74 | fi |
76 | | - if [ ! -s requirements_syncKnowledgeBaseFunction ]; then \ |
77 | | - echo "Error: requirements_syncKnowledgeBaseFunction is empty or missing"; \ |
| 75 | + if [ ! -s requirements_syncKnowledgeBaseFunction ] || [ "$(grep -c -v '^[[:space:]]*$' requirements_syncKnowledgeBaseFunction)" -eq 0 ]; then \ |
| 76 | + echo "Error: requirements_syncKnowledgeBaseFunction is empty or contains only blank lines"; \ |
78 | 77 | exit 1; \ |
79 | 78 | fi |
| 79 | + mkdir -p .dependencies/slackBotFunction/python |
| 80 | + mkdir -p .dependencies/syncKnowledgeBaseFunction/python |
80 | 81 | pip3 install -r requirements_slackBotFunction -t .dependencies/slackBotFunction/python |
81 | 82 | pip3 install -r requirements_syncKnowledgeBaseFunction -t .dependencies/syncKnowledgeBaseFunction/python |
82 | 83 |
|
|
0 commit comments