I have below scripts
in package.json
file:
"scripts": {
"deploy": "deploy.sh service1 && deploy.sh service2 && deploy.sh service3"
}
The deploy.sh
script accepts two parameters and the script only specifies one parameter. I'd like to set second parameter via command line, like:
yarn run deploy myName
I'd like to see the script will be translated into deploy.sh service1 myName && deploy.sh service2 myName&& deploy.sh service3 myName
is it possible to do in package.json script? Or I have to write a script file to do that?