Skip to content

Commit

Permalink
stop making firmware-less variant
Browse files Browse the repository at this point in the history
  • Loading branch information
yshalsager committed Mar 21, 2019
1 parent b4dcdca commit 904f932
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions xfu.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ def upload_non_arb(file, version, codename):
subprocess.call(['rclone', 'copy', file, 'osdn:/storage/groups/x/xi/xiaomifirmwareupdater/non-arb/'
+ f + '/' + version + '/' + codename + '/', '-v'])


def upload_fw_less(file, version, codename):
print("uploading: " + file)
codename = codename.split('-')[0]
f = set_folder(file)
subprocess.call(['rclone', 'copy', file, 'osdn:/storage/groups/x/xi/xiaomifirmwareupdater/firmware-less/'
+ f + '/' + version + '/' + codename + '/', '-v'])


def log_new(file, branch):
with open('log', 'a') as log:
codename = str(file).split("_")[1]
Expand All @@ -81,8 +72,6 @@ def log_new(file, branch):
var = 'firmware'
elif str(file).split("_")[0] == 'fw-non-arb':
var = 'non-arb firmware'
elif str(file).split("_")[0] == 'fw-less':
var = 'firmware-less'
try:
log.write(var + '|' + branch + '|' + model + '|' + codename + '|' + version + '|'
+ android + '|' + file + '|' + zip_size + '|' + md5 + '\n')
Expand Down Expand Up @@ -188,7 +177,6 @@ def log_new(file, branch):
if codename in arb_devices:
subprocess.call(['python3', 'create_flashable_firmware.py', '-F', file])
subprocess.call(['python3', 'create_flashable_firmware.py', '-N', file])
subprocess.call(['python3', 'create_flashable_firmware.py', '-L', file])
else:
subprocess.call(['python3', 'create_flashable_firmware.py', '-F', file])
remove(file)
Expand All @@ -202,10 +190,6 @@ def log_new(file, branch):
codename = str(file).split("_")[1]
version = set_version(file)
upload_non_arb(file, version, codename)
for file in glob("fw-less_*.zip"):
codename = str(file).split("_")[1]
version = set_version(file)
upload_fw_less(file, version, codename)
# log the made files
s = [f for f in glob("fw*.zip") if "_V" in f]
for file in s:
Expand Down Expand Up @@ -258,9 +242,6 @@ def log_new(file, branch):
elif t == 'non-arb firmware':
link = 'https://osdn.net/projects/xiaomifirmwareupdater/storage/non-arb/{0}/{1}/{2}/' \
.format(branch, version, codename)
elif t == 'firmware-less':
link = 'https://osdn.net/projects/xiaomifirmwareupdater/storage/firmware-less/{0}/{1}/{2}/' \
.format(branch, version, codename)
telegram_message = "New {0} {1} update available!: \n*Device:* {2} \n*Codename:* `{3}` \n" \
"*Version:* `{4}` \n*Android:* {5} \nFilename: `{6}` \nFilesize: {7} \n" \
"*MD5:* `{8}`*Download:* [Here]({9})\n@XiaomiFirmwareUpdater | @MIUIUpdatesTracker" \
Expand Down

0 comments on commit 904f932

Please sign in to comment.