Skip to content

Commit a410441

Browse files
Merge branch 'main' into AEA-5874-lambda-policy
2 parents f4b8df2 + 856d58b commit a410441

File tree

6 files changed

+913
-798
lines changed

6 files changed

+913
-798
lines changed

.github/workflows/cdk_package_code.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
id: asdf-version
3131
run: echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT"
3232

33-
3433
# using git commit sha for version of action to ensure we have stable version
3534
- name: Install asdf
3635
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
@@ -67,16 +66,18 @@ jobs:
6766
6867
- name: Build Python Lambda Functions
6968
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"; \
7473
exit 1; \
7574
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"; \
7877
exit 1; \
7978
fi
79+
mkdir -p .dependencies/slackBotFunction/python
80+
mkdir -p .dependencies/syncKnowledgeBaseFunction/python
8081
pip3 install -r requirements_slackBotFunction -t .dependencies/slackBotFunction/python
8182
pip3 install -r requirements_syncKnowledgeBaseFunction -t .dependencies/syncKnowledgeBaseFunction/python
8283

0 commit comments

Comments
 (0)