1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-01 19:42:52 -05:00

[build] Overhaul and unify release workflow

Authored by: bashonly, Grub4K

Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
bashonly
2023-11-12 17:49:15 -06:00
parent 8afd9468b0
commit 1d03633c5a
11 changed files with 365 additions and 241 deletions

View File

@ -13,10 +13,11 @@ def write_file(fname, content, mode='w'):
return f.write(content)
def read_version(fname='yt_dlp/version.py'):
def read_version(fname='yt_dlp/version.py', varname='__version__'):
"""Get the version without importing the package"""
exec(compile(read_file(fname), fname, 'exec'))
return locals()['__version__']
items = {}
exec(compile(read_file(fname), fname, 'exec'), items)
return items[varname]
def get_filename_args(has_infile=False, default_outfile=None):