mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-20 15:35:05 +00:00
Generate commit hash and timestamp for CDN (#415)
This commit is contained in:
parent
c1ff024657
commit
dddca1ea76
@ -1,10 +1,12 @@
|
|||||||
|
import subprocess
|
||||||
|
from datetime import datetime, UTC
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import configparser
|
import configparser
|
||||||
from dataclasses import dataclass, asdict
|
from dataclasses import dataclass, asdict
|
||||||
import json
|
import json
|
||||||
import shutil
|
import shutil
|
||||||
from configparser import ConfigParser, RawConfigParser
|
from configparser import RawConfigParser
|
||||||
|
|
||||||
VERBOSE = False
|
VERBOSE = False
|
||||||
DEVICES_FOLDER = "Devices"
|
DEVICES_FOLDER = "Devices"
|
||||||
@ -39,6 +41,8 @@ class ManifestBuildPart:
|
|||||||
@dataclass
|
@dataclass
|
||||||
class DeviceIndex:
|
class DeviceIndex:
|
||||||
version: str
|
version: str
|
||||||
|
created: str
|
||||||
|
gitCommit: str
|
||||||
devices: list
|
devices: list
|
||||||
|
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@ -174,6 +178,10 @@ def process_device(in_path: str, out_path: str, device_directory: str, device_id
|
|||||||
with open(json_manifest_path, 'w') as json_manifest_file:
|
with open(json_manifest_path, 'w') as json_manifest_file:
|
||||||
json.dump(asdict(manifest), json_manifest_file, indent=2)
|
json.dump(asdict(manifest), json_manifest_file, indent=2)
|
||||||
|
|
||||||
|
|
||||||
|
def get_git_commit_hash():
|
||||||
|
return subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('ascii').strip()
|
||||||
|
|
||||||
def main(in_path: str, out_path: str, version: str):
|
def main(in_path: str, out_path: str, version: str):
|
||||||
if not os.path.exists(in_path):
|
if not os.path.exists(in_path):
|
||||||
exit_with_error(f"Input path not found: {in_path}")
|
exit_with_error(f"Input path not found: {in_path}")
|
||||||
@ -181,7 +189,12 @@ def main(in_path: str, out_path: str, version: str):
|
|||||||
shutil.rmtree(out_path)
|
shutil.rmtree(out_path)
|
||||||
os.mkdir(out_path)
|
os.mkdir(out_path)
|
||||||
device_directories = os.listdir(in_path)
|
device_directories = os.listdir(in_path)
|
||||||
device_index = DeviceIndex(version, [])
|
device_index = DeviceIndex(
|
||||||
|
version=version,
|
||||||
|
created=datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%S'),
|
||||||
|
gitCommit=get_git_commit_hash(),
|
||||||
|
devices=[]
|
||||||
|
)
|
||||||
for device_directory in device_directories:
|
for device_directory in device_directories:
|
||||||
if device_directory.endswith("-symbols"):
|
if device_directory.endswith("-symbols"):
|
||||||
continue
|
continue
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
- Add low memory warning when calling DevelopmentService::handleAppInstall()
|
- Add low memory warning when calling DevelopmentService::handleAppInstall()
|
||||||
- Add low memory warning when calling tt::app::install
|
- Add low memory warning when calling tt::app::install
|
||||||
- Add statusbar icon that shows low/critical memory warnings
|
- Add statusbar icon that shows low/critical memory warnings
|
||||||
- CDN upload should mention upload timestamp (at least for snapshot builds)
|
|
||||||
- Change ButtonControl to work with interrupts and xQueue
|
- Change ButtonControl to work with interrupts and xQueue
|
||||||
- TCA9534 keyboards should use interrupts
|
- TCA9534 keyboards should use interrupts
|
||||||
- GT911 drivers should use interrupts if it's stable
|
- GT911 drivers should use interrupts if it's stable
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user