Comments (6)
Guillaume, I noticed your projects a few days ago. I am interested.
Unfortunately, I do not use VSTS and do not know how to try it.
I have a remark, if you do not mind. You use Invoke-Expression
for invoking
Invoke-Build
. Invoke-Expression
is not a perfect way to run something in
PowerShell. It often makes things more difficult than they should be. More
difficult to diagnose issues, for example. Note that in your similar psake
based project you do not use Invoke-Expression
and invoke psake
directly. This is much better.
As a side question, do you have the logo in 128x128 size?
No. You can easily make one. It's just the text >ib
with the font Magneto.
from invoke-build.
@nightroman. You can create a free account on VSTS here if you want: https://www.visualstudio.com/products/visual-studio-team-services-vs
As for Invoke-Expression
, i've used it for Invoke-Build
because of the following constraints:
- The parameters specified by the users in the build task UI are passed as string to the build task script
Invoke-Build
supports dynamic parameters
So the only way i found to enable users to specify dynamic parameters in the UI and use them with those constraints was to create the PowerShell command as a string and then use Invoke-Expression
on it. I didn't have this issue with psake
because the do not support dynamic parameters but uses hashtable so i was able to parse the input strings and convert them to hashtables.
Of course if you know a better way (i'm not a PowerShell expert) i'm glade to have your advices :)
from invoke-build.
Invoke-Build also supports passing parameters as a hashtable, see its parameter Parameters
:
-Parameters
A hashtable of parameters passed in the build script. It is needed only
in special cases. Normally build script parameters may be specified for
Invoke-Build itself, thanks to PowerShell dynamic parameters.
Dynamic parameters and the hashtable Parameters are not used together.
If build script parameters conflict with Invoke-Build parameters then
the hashtable Parameters is the only way to pass them in the script.
Your case is probably special, i.e. it makes sense to use Parameters
hashtable instead of dynamic parameters because it avoids Invoke-Expression
. On the other hand, if you see that Invoke-Expression
works fine in practice then why not.
from invoke-build.
Nice icon, by the way. May I borrow when I need one?
from invoke-build.
As Invoke-Expression seems to be working (and is also used by Microsoft in their own tasks) i will keep it like this but keep in mind if any issue happens to switch to the Parameters argument (which i didn't see :( )
For the icon you can use, it was just 5 minutes of work in paint.net as soon as i had the font name :)
from invoke-build.
I have created the wiki page Related Projects. It includes this VSTS extension.
from invoke-build.
Related Issues (20)
- Is it possible to change the name of the build in Build-Parallel? HOT 7
- Invoke-Build with `Set-StrictMode -Version [123]` Results in Exception HOT 28
- Improve `exec -echo` ANSI rendering
- Write-Build: render lines separately if ANSI.
- Amend output on task errors.
- Reusing or sharing tasks HOT 5
- ib.cmd ? ignores a specified file
- vscode outline view: no symbols found in document HOT 2
- Different module and package versions HOT 2
- Parallel execution based on dependency tree HOT 2
- invoke-build discovery fails in powershell container HOT 3
- Please consider adding -Computername and -Session parameter to Task HOT 8
- GitHub action output is not colored
- Color and formatting text in Azure DevOps Pipelines HOT 8
- Use-BuildEnv should make parameters mandatory
- Invoke-BuildExec spitting out service principal secret as current directory HOT 6
- Exec doesn't work well with forward slash arguments HOT 7
- Use `[System.Management.Automation.Cmdlet]::CommonParameters` to get the names of all common parameters HOT 3
- Task condition does not work HOT 8
- Build-Parallel writes only to Output stream HOT 7
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 invoke-build.