Comments (5)
I understand that but the <custom host domain> will change according to the stage we are building - for development it is one thing, testing it is different and so on. Is there a way to have the <custom host domain> value, in the args array, change according to values passed in from the command line?
from mbt.
Yeah - this is the approach I thought I would have to take (but hoped I could avoid). Thanks for the response. Would like to offer my help developing this as a feature but don't have much free time at the moment 😞
from mbt.
Custom arguments are specified in .mbt.yml
. In this instance (assuming this is your build command in linux), you could do something like:
build:
linux:
cmd: npm
args: ['run', 'dev:eap', '--', '--DEV_API', <custom host domain>]
hth
from mbt.
Schema of .mbt.yml
is documented here:
https://mbtproject.github.io/mbt/#synopsis
from mbt.
Sorry I misunderstood your question 😊.
Currently this is supported via environment variables. To achieve this, you would need a script like this:
#!/bin/sh
set -e
npm run dev:eap -- --DEV_API $DEV_API
Then you configure that as your command in .mbt.yml
and at the point you invoke build, you do so with the correct environment values.
DEV_API="https://dev-api/" mbt build
As a side note, it would be really nice to have a feature to expand arguments to a command with environment variables so that you would not have to write the wrapper script 😉
from mbt.
Related Issues (20)
- Add "default command" behavior HOT 2
- Visualise the entirety of a filtered sub-graph HOT 7
- 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.