Comments (3)
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.
Yeah, thanks. Makes sense and I'm convinced that we should do this :-)
from mbt.
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)
- Add "default command" behavior HOT 2
- Visualise the entirety of a filtered sub-graph HOT 7
- Passing command line arguments to `build` or any command HOT 5
- Versions of other folders as environment variables to current build HOT 4
- .NET core project native support HOT 1
- mbt does not restore a detached head after the build
- ENHANCEMENT: Exclude files from being considered when diffing between commits. HOT 1
- libssl.so.1.0.0 deprecated HOT 9
- Run builds or commands in parallel? HOT 7
- Template function for iterating modules in correct build order HOT 5
- Can't build mbt in alpine based container HOT 6
- Mbt run-in branch "BranchName" -m "createafile" not working
- How file diffrential handle by mbt? HOT 2
- mbt does not work in alpine HOT 2
- Diff build is not working as expected in CI
- Any plans for new Linux Release location? HOT 7
- MBT run-in with -c throws error on GitHub actions - Ubuntu 20.04.4 LTS HOT 2
- Tag a new release to benefit of static linking work brought on master HOT 4
- Improve documentation structure
- [bug] mbt always return exit code 0 HOT 2
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 mbt.