8
8
print ("Usage: get_rust_apps.py <github_token>" )
9
9
sys .exit (1 )
10
10
11
- ledger_devices = ["nanos+" , "nanox" , "stax" , "flex" ]
12
- filtered_apps = ["app-kadena-legacy" , "app-pocket" ]
11
+ # Excluded Rust apps
12
+ # app-kadena-legacy: has been replaced by app-kadena
13
+ # app-pocket: does not build (Obsidians' Alamgu issue)
14
+ excluded_apps = ["app-kadena-legacy" , "app-pocket" ]
13
15
14
- # Retrieve all apps on LedgerHQ GitHub organization
16
+ # Excluded devices
17
+ excluded_devices = ["nanos" ]
18
+
19
+ # Retrieve all public apps on LedgerHQ GitHub organization
15
20
token = sys .argv [1 ]
16
21
gh = GitHubLedgerHQ (token )
17
- apps = gh .apps .filter (archived = Condition .WITHOUT )
22
+ apps = gh .apps .filter (private = Condition . WITHOUT , archived = Condition .WITHOUT )
18
23
19
24
rust_apps = []
20
25
exclude_apps = []
29
34
else :
30
35
# Filter out apps that are Rust based
31
36
if manifest .app .sdk == "rust" :
32
- rust_apps .append (app .name )
33
- # filter out app for specific devices
34
- for d in ledger_devices :
35
- if d not in manifest .app .devices or app .name in filtered_apps :
36
- exclude_apps .append ({"app-name" : app .name , "device" : d })
37
+ if app .name not in excluded_apps :
38
+ for d in manifest .app .devices :
39
+ if d not in excluded_devices :
40
+ rust_apps .append ({"app-name" : app .name , "device" : d })
37
41
38
- # save the list of Rust apps in a json format:
42
+ # save the list of ( apps, device) pairs to build in a json format:
39
43
with open ("rust_apps.json" , "w" ) as f :
40
- f .write (json .dumps (rust_apps ))
41
-
42
- # save the list of Excluded apps in a json format:
43
- with open ("exclude_apps.json" , "w" ) as f :
44
- f .write (json .dumps (exclude_apps ))
45
-
46
- # save the list of Ledger devices in a json format:
47
- with open ("ledger_devices.json" , "w" ) as f :
48
- f .write (json .dumps (ledger_devices ))
44
+ f .write (json .dumps (rust_apps ))
0 commit comments