From 6f1306887a3bb35503ebfa2c914d6e1fc1257668 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 8 Oct 2023 18:44:08 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(Makefile):=20simplify=20fr?= =?UTF-8?q?ontend=20target=20by=20combining=20install=5Ffrontend=20and=20r?= =?UTF-8?q?un=5Ffrontend=20commands=20=F0=9F=90=9B=20fix(Makefile):=20hand?= =?UTF-8?q?le=20error=20in=20install=5Ffrontend=20command=20and=20attempt?= =?UTF-8?q?=20to=20fix=20it=20by=20running=20install=5Ffrontendc=20?= =?UTF-8?q?=F0=9F=94=A7=20chore(Makefile):=20simplify=20backend=20target?= =?UTF-8?q?=20by=20combining=20install=5Fbackend=20and=20run=5Fbackend=20c?= =?UTF-8?q?ommands=20=E2=9C=A8=20feat(Makefile):=20add=20support=20for=20l?= =?UTF-8?q?ogin=20flag=20to=20control=20autologin=20feature=20in=20backend?= =?UTF-8?q?=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 168ac06d2..79a2f6582 100644 --- a/Makefile +++ b/Makefile @@ -53,12 +53,8 @@ setup_devcontainer: poetry run langflow --path src/frontend/build frontend: - @-make install_frontend - @if [ $$? -ne 0 ]; then \ - echo "An error occurred while installing frontend dependencies. Attempting to fix."; \ - make install_frontendc; \ - fi - make run_frontend + @-make install_frontend || (echo "An error occurred while installing frontend dependencies. Attempting to fix." && make install_frontendc) + @make run_frontend frontendc: make install_frontendc @@ -69,12 +65,12 @@ install_backend: backend: make install_backend -ifeq ($(autologin),1) - @echo "Running backend with autologin"; - LANGFLOW_AUTO_LOGIN=True poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 -else +ifeq ($(login),1) @echo "Running backend without autologin"; - poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 + poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 --no-open-browser +else + @echo "Running backend with autologin"; + LANGFLOW_AUTO_LOGIN=True poetry run langflow run --backend-only --port 7860 --host 0.0.0.0 --no-open-browser endif build_and_run: