Allows us to run/copy make targets directly from vscode terminal.
To export environment variables while running targets.
Open settings.json
and add configs
"make-runner.env": {
"development": {
"AWS_PROFILE": "development",
"RAILS_ENV": "development",
"ROLE": "admin",
"ENABLE_MFA": false
},
"staging": {
"AWS_PROFILE": "staging",
"RAILS_ENV": "staging",
"ROLE": "user",
"ENABLE_MFA": true
},
"none": {}
}
Note: This is optional step to export environment variables while running the targets.
- Open any Makefile
- Put the cursor on any target
- Use key bindings
cmd+shift+enter
for Mac orctrl+shift+enter
for PC to run the target.
Note: This will execute the commands in the active terminal of vscode. If your current terminal is busy, create a new terminal before executing the target.
- Use key bindings
cmd+shift+c
for Mac orctrl+shift+c
for PC to copy the target command. Now you can paste the command in the terminal of your choice.