Add json index of files to CI uploads (#24097)
This commit is contained in:
parent
2e671cfd8b
commit
063f1444c6
4 changed files with 32 additions and 3 deletions
26
util/ci/firmware_list_generator.py
Normal file
26
util/ci/firmware_list_generator.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import os
|
||||
import json
|
||||
from pathlib import Path
|
||||
from time import gmtime, strftime
|
||||
|
||||
DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z'
|
||||
|
||||
def current_datetime():
|
||||
return strftime(DATETIME_FORMAT, gmtime())
|
||||
|
||||
|
||||
qmk_firmware_dir = Path(os.path.realpath(__file__)).parents[2]
|
||||
|
||||
binaries = []
|
||||
binaries.extend(qmk_firmware_dir.glob("*.bin"))
|
||||
binaries.extend(qmk_firmware_dir.glob("*.hex"))
|
||||
binaries.extend(qmk_firmware_dir.glob("*.uf2"))
|
||||
binaries = list(sorted(binaries))
|
||||
|
||||
data = []
|
||||
for binary in binaries:
|
||||
data.append(binary.name)
|
||||
|
||||
keyboard_all_json = json.dumps({'last_updated': current_datetime(), 'files': data}, separators=(',', ':'))
|
||||
|
||||
print(keyboard_all_json)
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="icon" href="https://qmk.fm/logo.png" />
|
||||
<style type="text/css">
|
||||
{{ ansi2html_styles }}
|
||||
|
||||
|
@ -66,7 +67,7 @@
|
|||
<div style="float: left">
|
||||
<div class="container">
|
||||
<div style="display: table-cell; vertical-align: middle;">
|
||||
<a href="https://qmk.fm/"><img src="https://qmk.fm/assets/images/badge-community-dark.svg" style="width: 30em;" /></a>
|
||||
<a href="https://qmk.fm/"><img src="https://qmk.fm/badge-community-dark.svg" style="width: 30em;" /></a>
|
||||
</div>
|
||||
<div class="header-container">
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue