From 76dd40410c126d80cacd0d67282edb5d41011f8d Mon Sep 17 00:00:00 2001 From: Aren Elchinyan Date: Tue, 14 Nov 2023 22:11:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index d30ca1b..fb615f8 100644 --- a/build.py +++ b/build.py @@ -10,8 +10,9 @@ def update_repo(): # Выполняем команду git pull для обновления репозитория result = subprocess.run(['git', 'pull'], capture_output=True, text=True) + # Проверяем вывод команды git pull - if result.stdout.strip().lower() == 'already up to date': + if 'up to date' in result.stdout.strip().lower(): print('No updates, waiting for further update...') return False print('Repository updated') @@ -83,7 +84,7 @@ def main(): shutil.rmtree('/var/www/html/', ignore_errors=True) shutil.copytree(bin_path, '/var/www/html/') - + # Ожидаем 2 минуты перед следующей проверкой обновлений time.sleep(120)