Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-in support to run platform specific cmd #89

Open
bashiransari opened this issue Jun 8, 2018 · 2 comments
Open

run-in support to run platform specific cmd #89

bashiransari opened this issue Jun 8, 2018 · 2 comments

Comments

@bashiransari
Copy link
Contributor

Which mbt command are you having troubles with?
Run-in

What's the current behaviour?
I cannot have one command name with different cmd on different platforms. the os property on the command just prevents the command from being executed on non-related platforms

What's the expected behaviour?
One command name with different cmd for each platform just like build command

@buddhike
Copy link
Member

buddhike commented Jun 8, 2018

I guess the proposed structure for user defined commands would be:

commands:
  name:
    foo:
      - cmd: foo.sh
         args: [a, b]
         os: [linux, darwin]
      - cmd: powershell
         args: [-file, foo.ps1]
         os: [windows]
    bar:
      cmd: npm
      args: [build]
      os: [windows, linux, darwin]

With this we should be able to run mbt run-in xxx foo with specific configuration per os. mbt run-in xxx bar on the other, hand gives the default configuration across a set of environments (current behaviour with less configuration).

What do you think?

@bashiransari
Copy link
Contributor Author

bashiransari commented Jun 16, 2018

I think it’s better to have run-in model consistent with build command.
Is there any fundumental difference between build and run-in ?
If no, I wolud say this tool (mbt) is mono repo task runner tool instead of mono repo build tool abd build is just one of the tasks (it’s the default task and you don’t need to use run-in for it just like npm start)
Also it would be good if can change run-in to run just to make it easier to type and remember

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants