aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts
diff options
context:
space:
mode:
Diffstat (limited to 'devscripts')
-rw-r--r--devscripts/update-version.py4
-rw-r--r--devscripts/utils.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/devscripts/update-version.py b/devscripts/update-version.py
index caebf4241..9cf8b42e6 100644
--- a/devscripts/update-version.py
+++ b/devscripts/update-version.py
@@ -50,5 +50,7 @@ UPDATE_HINT = None
'''
write_file('yt_dlp/version.py', VERSION_FILE)
-print(f'::set-output name=ytdlp_version::{VERSION}')
+github_output = os.getenv('GITHUB_OUTPUT')
+if github_output:
+ write_file(github_output, f'ytdlp_version={VERSION}\n', 'a')
print(f'\nVersion = {VERSION}, Git HEAD = {GIT_HEAD}')
diff --git a/devscripts/utils.py b/devscripts/utils.py
index aa17a5f7f..b91b8e65a 100644
--- a/devscripts/utils.py
+++ b/devscripts/utils.py
@@ -7,8 +7,8 @@ def read_file(fname):
return f.read()
-def write_file(fname, content):
- with open(fname, 'w', encoding='utf-8') as f:
+def write_file(fname, content, mode='w'):
+ with open(fname, mode, encoding='utf-8') as f:
return f.write(content)