anki-sync-server/scripts/poetry-export.sh

16 lines
667 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# file: poetry-export.sh
# description: Lock dependencies and export them as backward-compatible requirements.txt files.
echo '[INFO] Updating poetry.lock file.'
poetry lock
echo '[INFO] Generating requirements.txt.'
echo -e "# THE FILE WAS GENERATED BY POETRY, DO NOT EDIT!\n\n" > src/requirements.txt
poetry export --without-hashes -f requirements.txt >> src/requirements.txt
echo '[INFO] Generating requirements-dev.txt.'
echo -e "# THE FILE WAS GENERATED BY POETRY, DO NOT EDIT!\n\n" > src/requirements-dev.txt
poetry export --dev --without-hashes -f requirements.txt >> src/requirements-dev.txt
echo "-e src/." >> src/requirements-dev.txt