Skip to content

Commit 668120d

Browse files
add wip
1 parent 2969dc0 commit 668120d

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

gen-update-json.py renamed to gen_data/gen-update-json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import json
33
import optparse
4+
import utils
45

56
GIT_ROOT = os.popen("git rev-parse --show-toplevel").read().strip()
67
DIR = "."
@@ -23,7 +24,6 @@ def update_json_conf(file) -> None:
2324
file = open(JSON_CONF, 'w')
2425
json.dump(jdata, file, indent=4)
2526

26-
2727
def strip_info(file):
2828
basename = os.path.basename(file)
2929
name = os.path.splitext(basename)[0]

gen_data/utils.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import json
2+
3+
def resolv_data(file,
4+
suite: str,
5+
varients: list,
6+
Name: str,
7+
FriendlyName: str,
8+
arch: list = ["aarch64", "armv7l", "armhf", "amd64", "x86_64"]
9+
):
10+
file = json.load(open(file, 'r'))
11+
12+
# update suites list
13+
file["suites"].append(suite)
14+
15+
# [WIP] create new suite
16+
new_suite = {
17+
f"{suite}" : {
18+
"variants" : varients,
19+
}
20+
}
21+
22+
# register varients
23+
for variant in varients:
24+
new_suite[f"{suite}"][f"{variant}"] = {
25+
"arch" : arch,
26+
}
27+
28+
# exp1
29+
# create new data(">/file", "sai", ["raw"], )
30+
31+

0 commit comments

Comments
 (0)