mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-11 07:01:54 +02:00
[cleanup] Misc
This commit is contained in:
parent
eb8fd6d044
commit
392389b7df
8 changed files with 46 additions and 38 deletions
|
@ -9,11 +9,10 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|||
|
||||
import argparse
|
||||
import contextlib
|
||||
import subprocess
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
from devscripts.utils import read_version, write_file
|
||||
from devscripts.utils import read_version, run_process, write_file
|
||||
|
||||
|
||||
def get_new_version(version, revision):
|
||||
|
@ -32,7 +31,7 @@ def get_new_version(version, revision):
|
|||
|
||||
def get_git_head():
|
||||
with contextlib.suppress(Exception):
|
||||
return subprocess.check_output(['git', 'rev-parse', 'HEAD'], text=True).strip() or None
|
||||
return run_process('git', 'rev-parse', 'HEAD').stdout.strip()
|
||||
|
||||
|
||||
VERSION_TEMPLATE = '''\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue