Bump version to 24.04.3.4
[LibreOffice.git] / bin / update / upload_builds.py
blob97a2f284848a05320751f60a481725b0d33aeffd
1 #! /usr/bin/env python3
3 import sys
4 import os
5 import subprocess
7 from path import convert_to_unix
9 from tools import replace_variables_in_string
12 def main():
13 # product_name = sys.argv[1]
14 buildid = sys.argv[2]
15 platform = sys.argv[3]
16 update_dir = sys.argv[4]
17 upload_url_arg = sys.argv[5]
18 channel = sys.argv[6]
20 upload_url = replace_variables_in_string(upload_url_arg, channel=channel, buildid=buildid,
21 platform=platform)
23 target_url, target_dir = upload_url.split(':')
25 command = "ssh %s 'mkdir -p %s'" % (target_url, target_dir)
26 print(command)
27 subprocess.call(command, shell=True)
28 for file in os.listdir(update_dir):
29 if file.endswith('.mar'):
30 subprocess.call(['scp', convert_to_unix(os.path.join(update_dir, file)), upload_url])
33 if __name__ == '__main__':
34 main()