From 3963114c7bf0ce9d45c37fd9b6620d40586f264b Mon Sep 17 00:00:00 2001 From: Adam Dougal Date: Fri, 4 Oct 2024 10:02:19 +0100 Subject: [PATCH] refactor: Stop generating requirements.txt during deployment (#1354) --- azure.yaml | 16 ---------------- scripts/package_frontend.ps1 | 3 ++- scripts/package_frontend.sh | 3 ++- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/azure.yaml b/azure.yaml index ae83de08e..553eb7950 100644 --- a/azure.yaml +++ b/azure.yaml @@ -29,24 +29,8 @@ services: project: ./code/backend language: py host: appservice - hooks: - prepackage: - windows: - shell: pwsh - run: poetry install; poetry export -o requirements.txt - posix: - shell: sh - run: poetry install; poetry export -o requirements.txt function: project: ./code/backend/batch language: py host: function - hooks: - prepackage: - windows: - shell: pwsh - run: poetry install; poetry export -o requirements.txt - posix: - shell: sh - run: poetry install; poetry export -o requirements.txt diff --git a/scripts/package_frontend.ps1 b/scripts/package_frontend.ps1 index 82b82acdf..0bc9484b3 100644 --- a/scripts/package_frontend.ps1 +++ b/scripts/package_frontend.ps1 @@ -3,9 +3,10 @@ rm dist/* -r -Force # Python poetry install -poetry export -o dist/requirements.txt cp *.py dist -Force cp backend dist -r -Force +cp ../pyproject.toml dist -Force +cp ../poetry.lock dist -Force # Node cd frontend diff --git a/scripts/package_frontend.sh b/scripts/package_frontend.sh index 6b9c9893b..28db06671 100755 --- a/scripts/package_frontend.sh +++ b/scripts/package_frontend.sh @@ -4,9 +4,10 @@ set -eou pipefail mkdir -p dist rm -rf dist/* poetry install -poetry export -o dist/requirements.txt cp *.py dist cp -r backend dist +cp ../pyproject.toml dist +cp ../poetry.lock dist cd frontend npm install