Giter Club home page Giter Club logo

Comments (3)

ojizero avatar ojizero commented on July 25, 2024 1

Hello, sorry it toke me a while to reply 😅

I am aware of the user defined commands, except for the optional os property in them. But I think having it with the build main command would be more appropriate when it comes to how we think of the development and build process in general.

That is that I think it's more correct to have a separation between the main build command which could be responsible for compiling the code and installing any required dependencies, from user defined ones which could contain other utilities such as a test command for example.

Also using the user defined commands could create an inconstancy in using the build command, for example, in the case of a custom build command being passed on a Linux platform for example, it could mean defining two build commands and then alternating between them depending on the platform, potentially running something as mbt run-in xxxx build or mbt run-in xxxx build-custom, instead of just running mbt build xxxx and having MBT figure out what to run based on the platform.

Which is why I think having the current build but with a default option could be better than deprecating it in favor of user defined commands. What do you think?

from mbt.

buddhike avatar buddhike commented on July 25, 2024 1

Yeah, thanks. Makes sense and I'm convinced that we should do this :-)

from mbt.

buddhike avatar buddhike commented on July 25, 2024

Good question. This facility is currently not available in build xxx commands. However, we introduced a user defined commands feature that has this feature.
It's not well documented at the moment, but you will get the gist of it here:
https://github.com/mbtproject/mbt#user-defined-commands

You basically run it like this:
run-in diff|branch|head|local|pr|commit --command <command name>

User defined commands have a property called os where you can optionally specify os restrictions.
e.g.

commands:
  hello:
    cmd: echo
    args: [hello]
    os: [darwin, linux]

We would like to port this functionality to build command as well. Alternatively, if everyone is finding user defined commands as a more flexible way to define them, we could start deprecating build command.

from mbt.

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.