Skip to content

Commit

Permalink
fix: create package/lib when there is something to install there (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemrys committed Jul 15, 2022
1 parent cdca517 commit 0bc0984
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ runs:
run: |
if [ -f "poetry.lock" ]
then
pip install poetry
if [ -f "globalConfig.json" ]
pip install poetry
poetry export --without-hashes -o requirements.txt
if [ "$(grep -cve '^\s*$' requirements.txt)" -ne 0 ]
then
echo " globalConfig.json found, creating package/lib and exporting poetry dependencies "
echo "Prod dependencies were found, creating package/lib folder"
mkdir -p package/lib || true
poetry export --without-hashes -o package/lib/requirements.txt
mv requirements.txt package/lib
else
echo "No prod dependencies were found"
rm requirements.txt
fi
poetry export --without-hashes --dev -o requirements_dev.txt
if [ ! -z $INPUT_VERSION ]
Expand Down

0 comments on commit 0bc0984

Please sign in to comment.