Comments (5)
I have a quick and dirty work around.
Rather than executing immediately, generate a bat or ps1 with the steps. Execute the file generated at the end of ScriptBlockExecuterStep. Execute or when switching between batch and powershell, discard the file after execution to prevent multiple execution.
from localappveyor.
This is by design. Each line is, effectively, it's own script. This is true for both localappveyor and appveyor itself.
To achieve what you want you've to make the line a block. This is YAML sintax and there are multiple subtle different ways of represent blocks.
Your example would be:
build_script:
- |-
echo --------------------------------------------------------------------------------
echo Build tinyformat
mkdir build
cd build
cmake -G "%COMPILER%" ..
cmake --build . --config %CONFIGURATION%
If you look at appveyor.yml reference, you can see that you can even mix both batch and powershell scripts for example. Just because the lines are contiguous it doesn't mean they run within the same context.
install:
# by default, all script lines are interpreted as batch
- echo This is batch
# to run script as a PowerShell command prepend it with ps:
- ps: Write-Host 'This is PowerShell'
# batch commands start from cmd:
- cmd: echo This is batch again
- cmd: set MY_VAR=12345
from localappveyor.
That’s good to know I guess I chose the wrong app to test with. I’ll raise an issue with the tinyformat people instead. Thanks.
from localappveyor.
I hope AppVeyor is not doing something smart and joining lines together if they are of the same type. At least is not what they state in their docs.
I've added few tests to represent these scenarios: 26fb516
from localappveyor.
It looks like appveyor might be doing something funky behind the scenes. Tinyformat's appveyor reports that they're passing with the current config.
from localappveyor.
Related Issues (17)
- PowerShell scripts might quietly fail when on dotnet core
- feature_request(linting): Local appveyor.yml lint HOT 2
- LocalAppVeyor --help returns error HOT 2
- Error while parsing appveyor.yml HOT 2
- Error while parsing appveyor file HOT 1
- Cannot install on NetCore 2.1 HOT 2
- feature_request(enhancement): skip steps HOT 1
- feature_request(enhancement): install missing software
- Support environment variables expansion on non-script configurations HOT 1
- Support `assembly_info` step HOT 1
- Support `allow_failures` on matrix. HOT 1
- feature_request(net6): run LocalAppVeyor on Ubuntu 22
- Support for `before_test`, `test` and `after_test` HOT 1
- Fallback to .appveyor.yml if no appveyor.yml is available HOT 1
- Produce binaries\packages for different runtimes HOT 2
- Warning about System.ComponentModel.TypeConverter during build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localappveyor.