Attempt to upload alpha update files
This commit is contained in:
parent
0b5ca8ddb3
commit
a912b4aeef
@ -59,8 +59,8 @@ alpha32:
|
|||||||
- '%PYTHON3-32% prepare_zipversion.py'
|
- '%PYTHON3-32% prepare_zipversion.py'
|
||||||
- cd ..
|
- cd ..
|
||||||
- move src\socializer.zip socializer_x86.zip
|
- move src\socializer.zip socializer_x86.zip
|
||||||
- '%PYTHON3-32% scripts/upload.py'
|
|
||||||
- '%PYTHON3-32% scripts/generate_update_file.py'
|
- '%PYTHON3-32% scripts/generate_update_file.py'
|
||||||
|
- '%PYTHON3-32% scripts/upload.py'
|
||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
- master
|
- master
|
||||||
|
@ -42,14 +42,21 @@ connection.cwd("static/files/")
|
|||||||
if version not in connection.nlst():
|
if version not in connection.nlst():
|
||||||
print("Creating version directory {} because does not exists...".format(version,))
|
print("Creating version directory {} because does not exists...".format(version,))
|
||||||
connection.mkd(version)
|
connection.mkd(version)
|
||||||
|
|
||||||
|
if "update" not in connection.nlst():
|
||||||
|
print("Creating update info directory because does not exists...")
|
||||||
|
connection.mkd("update")
|
||||||
connection.cwd(version)
|
connection.cwd(version)
|
||||||
print("Moved into version directory")
|
print("Moved into version directory")
|
||||||
files = glob.glob("*.zip")+glob.glob("*.exe")
|
files = glob.glob("*.zip")+glob.glob("*.exe")+glob.glob("*.json")
|
||||||
print("These files will be uploaded into the version folder: {}".format(files,))
|
print("These files will be uploaded into the version folder: {}".format(files,))
|
||||||
for file in files:
|
for file in files:
|
||||||
transferred = 0
|
transferred = 0
|
||||||
print("Uploading {}".format(file,))
|
print("Uploading {}".format(file,))
|
||||||
with open(file, "rb") as f:
|
with open(file, "rb") as f:
|
||||||
|
if file.endswith("json"):
|
||||||
|
connection.storbinary('STOR ../update/%s' % file, f, callback=callback, blocksize=1024*1024)
|
||||||
|
else:
|
||||||
connection.storbinary('STOR %s' % file, f, callback=callback, blocksize=1024*1024)
|
connection.storbinary('STOR %s' % file, f, callback=callback, blocksize=1024*1024)
|
||||||
print("Upload completed. exiting...")
|
print("Upload completed. exiting...")
|
||||||
connection.quit()
|
connection.quit()
|
Loading…
Reference in New Issue
Block a user