From ef0becaa93e0e22db4f0dc207b213b9a36fa10d7 Mon Sep 17 00:00:00 2001 From: Benny Date: Sun, 1 Dec 2024 18:00:51 +0100 Subject: [PATCH] pre-push --- README.md | 7 ++++++- pre-commit.py | 21 --------------------- 2 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 pre-commit.py diff --git a/README.md b/README.md index be0c7a17..a958fb82 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,12 @@ This Telegram bot allows you to download videos from YouTube and [other supported websites](#supported-websites). - +# development +install pre-commit +```shell +cp pre-push.py .git/hooks/pre-push +chmod +x .git/hooks/pre-push +``` # Usage * EU🇪🇺: [https://t.me/benny_2ytdlbot](https://t.me/benny_2ytdlbot) diff --git a/pre-commit.py b/pre-commit.py deleted file mode 100644 index 97a57448..00000000 --- a/pre-commit.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python3 -# coding: utf-8 - -# ytdlbot - pre-commit.py -# for dependabot -import tomllib -import subprocess - -with open("pyproject.toml", "rb") as file: - config = tomllib.load(file) - - -with open("requirements.txt", "w") as file: - for item in config["project"]["dependencies"]: - if " " in item: - item = item.split()[-1] - file.write(f"{item}\n") - -# commit with ammend -subprocess.run(["git", "add", "requirements.txt"]) -subprocess.run(["git", "commit", "--amend", "--no-edit"])