GithubHelp home page GithubHelp logo

Comments (6)

nightroman avatar nightroman commented on May 27, 2024

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.

qetza avatar qetza commented on May 27, 2024

@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.

nightroman avatar nightroman commented on May 27, 2024

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.

nightroman avatar nightroman commented on May 27, 2024

Nice icon, by the way. May I borrow when I need one?

from invoke-build.

qetza avatar qetza commented on May 27, 2024

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.

nightroman avatar nightroman commented on May 27, 2024

I have created the wiki page Related Projects. It includes this VSTS extension.

from invoke-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.