Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2d498c7

Browse files
authored
Merge pull request#1116 from fpistm/CI_dev
[CI] Add url option
2 parentscfc2de7 +422fde9 commit2d498c7

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

‎CI/build/arduino-cli.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ def check_config():
161161
globalroot_output_dir
162162
globaloutput_dir
163163
globallog_file
164+
globalstm32_url
165+
164166
ifargs.ciisFalse:
165167
ifos.path.isfile(path_config_filename):
166168
try:
@@ -198,11 +200,11 @@ def check_config():
198200

199201
try:
200202
output=subprocess.check_output(
201-
[arduino_cli,"version"],stderr=subprocess.DEVNULL,
203+
[arduino_cli,"version"],stderr=subprocess.STDOUT,
202204
)
203205
exceptsubprocess.CalledProcessErrorase:
204206
print('"'+" ".join(e.cmd)+'" failed with code: {}!'.format(e.returncode))
205-
print(e.stdout)
207+
print(e.stdout.decode("utf-8"))
206208
quit(e.returncode)
207209
else:
208210
res=re.match(r".*Version:\s+(\d+\.\d+\.\d+).*",output.decode("utf-8"))
@@ -215,14 +217,17 @@ def check_config():
215217
+arduino_cli_default_version
216218
)
217219

220+
ifargs.url:
221+
stm32_url=args.url
222+
218223
try:
219224
output=subprocess.check_output(
220225
[arduino_cli,"core","search","stm32","--additional-urls",stm32_url],
221-
stderr=subprocess.DEVNULL,
226+
stderr=subprocess.STDOUT,
222227
)
223228
exceptsubprocess.CalledProcessErrorase:
224229
print('"'+" ".join(e.cmd)+'" failed with code: {}!'.format(e.returncode))
225-
print(e.stdout)
230+
print(e.stdout.decode("utf-8"))
226231
quit(e.returncode)
227232
else:
228233
ifarduino_platformnotinoutput.decode("utf-8"):
@@ -232,13 +237,13 @@ def check_config():
232237
try:
233238
output=subprocess.check_output(
234239
[arduino_cli,"config","dump","--format","json"],
235-
stderr=subprocess.DEVNULL,
240+
stderr=subprocess.STDOUT,
236241
).decode("utf-8")
237242
exceptsubprocess.CalledProcessErrorase:
238243
print(
239244
'"'+" ".join(e.cmd)+'" failed with code: {}!'.format(e.returncode)
240245
)
241-
print(e.stdout)
246+
print(e.stdout.decode("utf-8"))
242247
quit(e.returncode)
243248
else:
244249
cli_config=json.loads(output)
@@ -465,7 +470,7 @@ def find_board():
465470
).decode("utf-8")
466471
exceptsubprocess.CalledProcessErrorase:
467472
print('"'+" ".join(e.cmd)+'" failed with code: {}!'.format(e.returncode))
468-
print(e.stdout)
473+
print(e.stdout.decode("utf-8"))
469474
quit(e.returncode)
470475
else:
471476
boards_list=json.loads(output)
@@ -488,7 +493,7 @@ def find_board():
488493
print(
489494
'"'+" ".join(e.cmd)+'" failed with code: {}!'.format(e.returncode)
490495
)
491-
print(e.stdout)
496+
print(e.stdout.decode("utf-8"))
492497
quit(e.returncode)
493498
else:
494499
board_detail=json.loads(output)
@@ -874,6 +879,12 @@ def build(build_conf):
874879
+cores_config_file_default,
875880
)
876881

882+
parser.add_argument(
883+
"-u","--url",metavar="<string>",help="additional URL for the board manager\
884+
Default url : "
885+
+stm32_url,
886+
)
887+
877888
parser.add_argument(
878889
"-v","--verbose",help="enable arduino-cli verbose mode",action="store_true"
879890
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp