-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Introduce run
to execute user commands
#179
Comments
Hello @boonwj Thank you for suggesting feature. This feature make sense as going further we introduce more and more Let's take this to next milestone. |
@boonwj Did you get time to work on the issue? |
Sorry, I forgot to follow up on this. I will work on it over the next few days. |
@boonwj Hi, I am assuming that, we are removing running user defined command by 1build xyz
The order of execution-
Let me know if you need more clarification |
The motivation behind this is to use as minimal command as possible. And the idea behind this tool was to avoid long commands. |
Oh I see what you mean. I misunderstood the intention of the feature. In the above mentioned order of execution, the program's behavior may be inconsistent with what the user expects. For example, should Would it perhaps be better for this functionality to be a flag wdyt? |
Hi @boonwj , How about giving Order :
Example yaml project: Sample Web App
commands:
- build: npm run build
- unset: echo 'removing something' Command: – Here the output will be something like this:
And then execute 1build command. When passed WDYT? |
I realised that this functionality in its current form would not be very useful. Since any future conflicting command will still break a user's existing workflow (i.e. running 1build's command over user's defined). It is more likely that they change the conflicting keyword instead of adding a Perhaps its better to raise a warning and continue executing user's commands first, or raise a conflicting keyword error and exit. |
@boonwj I see. I got your point. Agree most likely user will change their command name instead of using Let's go ahead with a showing warning message and continue executing the user's command as of now. With this we still have a chance to enhance this feature with WDYT? |
Yeah lets go ahead with that. I will work on it over the next few days. |
@boonwj thanks for signup. Looking forward to your PR. |
Description
Users are currently able to configure command names that are used by 1build. In this situation, 1build's main action will take place instead of the user's command. An example of this is shown below.
One way to deal with this will be for 1build to return an error when an invalid command name is found in the configuration. However, when additional commands are added by 1build in the future, it may conflict with a previously legal user configuration.
A specific 1build keyword such as
run
should be reserved to execute user-configured commands. This will allow future changes to 1build without affecting user configured commands.Acceptance
1build run [cmd1]
should execute the user configured command1build run [cmd1] [cmd2] ...
should execute the commands in sequenceThe text was updated successfully, but these errors were encountered: