diff --git a/scripts/lock.sh b/scripts/poetry-export.sh old mode 100755 new mode 100644 similarity index 59% rename from scripts/lock.sh rename to scripts/poetry-export.sh index 6586716..fd3ba2a --- a/scripts/lock.sh +++ b/scripts/poetry-export.sh @@ -1,11 +1,15 @@ -#!/bin/bash -# file: lock.sh -# description: Lock dependencies and export requirements. +#!/usr/bin/env bash +# file: poetry-export.sh +# description: Lock dependencies and export them as backward-compatible requirements.txt files. -echo -e "# THE FILE WAS GENERATED BY POETRY, DO NOT EDIT!\n\n" > src/requirements.txt -echo -e "# THE FILE WAS GENERATED BY POETRY, DO NOT EDIT!\n\n" > src/requirements-dev.txt +echo '[INFO] Updating poetry.lock file.' poetry lock -poetry export --without-hashes -f requirements.txt >> src/requirements.txt -poetry export --dev --without-hashes -f requirements.txt >> src/requirements-dev.txt +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