@@ -1221,20 +1221,26 @@ def generate_pmbuild_config(config, taskname):
1221
1221
f .write (json .dumps (md , indent = 4 ))
1222
1222
1223
1223
1224
- # print available profiles in config.jsn of cwd
1225
- def print_profiles (config ):
1226
- print ("\n profiles:" )
1227
- print (" config.jsn (edit task settings or add profiles in here)" )
1228
- non_profiles = [
1224
+ # return config keys that are not runnable tasks
1225
+ def get_non_profiles ():
1226
+ return [
1229
1227
"tools" ,
1230
1228
"tools_help" ,
1231
1229
"extensions" ,
1232
1230
"user_vars" ,
1233
1231
"special_args" ,
1234
1232
"post_build_order" ,
1235
1233
"pre_build_order" ,
1236
- "build_order"
1234
+ "build_order" ,
1235
+ "user_args"
1237
1236
]
1237
+
1238
+
1239
+ # print available profiles in config.jsn of cwd
1240
+ def print_profiles (config ):
1241
+ print ("\n profiles:" )
1242
+ print (" config.jsn (edit task settings or add profiles in here)" )
1243
+ non_profiles = get_non_profiles ()
1238
1244
for p_name in config .keys ():
1239
1245
if p_name not in non_profiles :
1240
1246
p = config [p_name ]
@@ -1289,17 +1295,7 @@ def pmbuild_profile_help(config, build_order):
1289
1295
print (" config.jsn (edit task settings or add new ones in here)" )
1290
1296
print (" build order:" )
1291
1297
1292
- non_profiles = [
1293
- "tools" ,
1294
- "tools_help" ,
1295
- "extensions" ,
1296
- "user_vars" ,
1297
- "special_args" ,
1298
- "post_build_order" ,
1299
- "pre_build_order" ,
1300
- "build_order" ,
1301
- "user_args"
1302
- ]
1298
+ non_profiles = get_non_profiles ()
1303
1299
1304
1300
for task_name in build_order :
1305
1301
task = config [task_name ]
@@ -1316,11 +1312,17 @@ def pmbuild_profile_help(config, build_order):
1316
1312
1317
1313
print (" " * 8 + task_name )
1318
1314
1319
- print ("" )
1320
- print (" explicit tasks:" )
1315
+ explicit_tasks = []
1321
1316
for key in config :
1322
1317
if key not in build_order and key not in non_profiles :
1323
- print (" " * 8 + key )
1318
+ explicit_tasks .append (" " * 8 + key + "\n " )
1319
+
1320
+ if len (explicit_tasks ) > 0 :
1321
+ print ("" )
1322
+ print (" explicit tasks:" )
1323
+ for task in explicit_tasks :
1324
+ print (task )
1325
+
1324
1326
1325
1327
1326
1328
# build help for core tasks
0 commit comments