chore: remove unused script and log (#3343)
* refactor: Removed the unnecessary update_poetry script. * fix: Handle existing .env file without logging unnecessary message.
This commit is contained in:
parent
981f314a73
commit
db72268a04
3 changed files with 3 additions and 69 deletions
1
Makefile
1
Makefile
|
|
@ -249,7 +249,6 @@ setup_devcontainer: ## set up the development container
|
||||||
poetry run langflow --path src/frontend/build
|
poetry run langflow --path src/frontend/build
|
||||||
|
|
||||||
setup_env: ## set up the environment
|
setup_env: ## set up the environment
|
||||||
@sh ./scripts/setup/update_poetry.sh 1.8.2
|
|
||||||
@sh ./scripts/setup/setup_env.sh
|
@sh ./scripts/setup/setup_env.sh
|
||||||
|
|
||||||
frontend: ## run the frontend in development mode
|
frontend: ## run the frontend in development mode
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@ if [ ! -f .env ]; then
|
||||||
echo "Creating .env file"
|
echo "Creating .env file"
|
||||||
touch .env
|
touch .env
|
||||||
else
|
else
|
||||||
echo ".env file already exists"
|
# do nothing and do not log
|
||||||
|
true
|
||||||
fi
|
fi
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
||||||
# Utility function to display an error message and exit
|
|
||||||
exit_with_message() {
|
|
||||||
echo "$1" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if version argument is provided
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
exit_with_message "No argument supplied. Please provide the Poetry version to check."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Detect Operating System
|
|
||||||
OS="$(uname -s)"
|
|
||||||
case "$OS" in
|
|
||||||
Darwin)
|
|
||||||
OS="macOS"
|
|
||||||
;;
|
|
||||||
Linux)
|
|
||||||
OS="Linux"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit_with_message "Unsupported operating system. This script supports macOS and Linux."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
echo "Checking Poetry installation..."
|
|
||||||
|
|
||||||
# Check if Poetry is installed
|
|
||||||
if ! command -v poetry &> /dev/null
|
|
||||||
then
|
|
||||||
echo "Poetry is not installed. Installing..."
|
|
||||||
# Also install python 3.10 and use
|
|
||||||
curl -sSL https://install.python-poetry.org | python3 -
|
|
||||||
echo "Poetry installed successfully."
|
|
||||||
else
|
|
||||||
echo "Poetry is already installed."
|
|
||||||
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