Update backend installation process
This commit is contained in:
parent
c54c37cdc8
commit
a9cd2f1054
2 changed files with 27 additions and 2 deletions
5
Makefile
5
Makefile
|
|
@ -72,8 +72,9 @@ frontendc:
|
|||
make run_frontend
|
||||
|
||||
install_backend:
|
||||
poetry install --extras deploy
|
||||
poetry run pip install -e src/backend/base/.
|
||||
@echo 'Installing backend dependencies'
|
||||
@sh ./scripts/setup/update_poetry.sh 1.8.2
|
||||
@poetry install --extras deploy
|
||||
|
||||
backend:
|
||||
make install_backend
|
||||
|
|
|
|||
24
scripts/setup/update_poetry.sh
Normal file
24
scripts/setup/update_poetry.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if version argument is provided
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "No argument supplied. Please provide the Poetry version to check."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking Poetry version..."
|
||||
|
||||
# Check Poetry version
|
||||
poetry_version=$(poetry --version | awk '{print $3}' | tr -d '()')
|
||||
echo "Current Poetry version: $poetry_version"
|
||||
|
||||
# Compare version
|
||||
if [[ "$(printf '%s\n' "$1" "$poetry_version" | sort -V | head -n1)" != "$1" ]]; then
|
||||
echo "Poetry version is lower than $1. Updating..."
|
||||
# Update Poetry
|
||||
poetry self update
|
||||
echo "Poetry updated successfully."
|
||||
else
|
||||
echo "Poetry version is $1 or higher. No need to update."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue