tag:help.appveyor.com,2012-11-13:/discussions/questions/3888-multi-line-cmd-or-powershell-warning-ignoreAppVeyor: Discussion 2018-10-19T08:18:20Ztag:help.appveyor.com,2012-11-13:Comment/425454962017-05-12T13:10:20Z2017-05-12T13:10:20ZMulti line cmd or powershell warning ignore ?<div><p>You can use tweak/hack from our <a href="http://help.appveyor.com/discussions/questions/3880-per-matrix-configuration">previous conversation</a> like this:<br></p>
<pre>
<code>environment:
matrix:
- platform: msvc
build_command: msvc.bat
- platform: cygwin32
build_command: cygwin32.bat
build_script:
- cmd: '%build_command%</code>
</pre>
and keep all multi-line script in <code>.bat</code> files instead of YAML... Also no need to if/else with this approach.</div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/425454962017-05-12T14:48:42Z2017-05-12T14:48:42ZMulti line cmd or powershell warning ignore ?<div><p>Could you please paste an example with multiple commands ?<br>
From what you show me, I think that I will have something like this in the end.<br></p>
<pre>
<code>environment:
matrix:
- platform: msvc
build_command: "msvc.bat"
- platform: cygwin32
build_command: "cmd1 && cmd2 && cmd3 && cmd4 && cmd5 && cmd6 && cmd7 && cmd8 && cmd9 && cmd10 && cmd11 && cmd12 && cmd13 && cmd14 && cmd15 && cmd16 && cmd17 && cmd18 && cmd19 && cmd20 && cmd 21 && cmd 22 && cmd 23 && cmd 24 && ... && cmd99"</code>
</pre>
Which does not really do what I wanted in a first place ?</div>xarkestag:help.appveyor.com,2012-11-13:Comment/425454962017-05-12T17:48:57Z2017-05-12T17:48:57ZMulti line cmd or powershell warning ignore ?<div><p>Ilya meant you have to put your commands to a separate <code>my_build_commands.cmd</code> file, commit that <code>my_build_commands.cmd</code> file into repository and then use from <code>appveyor.yml</code>:</p>
<pre>
<code>...
build_script:
- my_build_commands.cmd</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/425454962017-05-12T18:03:21Z2017-05-12T18:03:21ZMulti line cmd or powershell warning ignore ?<div><p>Ok that's what I was thinking, thanks for precising :)</p></div>xarkes