sort before uploading assets
This commit is contained in:
parent
0526a2b120
commit
fb8c743d3b
@ -4,21 +4,20 @@ import os
|
||||
import os.path
|
||||
import sys
|
||||
import uritemplate
|
||||
import glob
|
||||
|
||||
sys.path.append("adabot")
|
||||
import github_requests as github
|
||||
|
||||
exit_status = 0
|
||||
|
||||
for dirpath, dirnames, filenames in os.walk("../bin"):
|
||||
if not filenames:
|
||||
continue
|
||||
for filename in filenames:
|
||||
full_filename = os.path.join(dirpath, filename)
|
||||
label = filename.replace("adafruit-circuitpython-", "")
|
||||
filepaths = list(glob.iglob('../bin/*/*', recursive=True))
|
||||
filepaths.sort()
|
||||
|
||||
for full_filename in filepaths:
|
||||
filename = os.path.basename(full_filename)
|
||||
url_vars = {}
|
||||
url_vars["name"] = filename
|
||||
url_vars["label"] = label
|
||||
url = uritemplate.expand(os.environ["UPLOAD_URL"], url_vars)
|
||||
headers = {"content-type": "application/octet-stream"}
|
||||
print(url)
|
||||
|
Loading…
Reference in New Issue
Block a user