This Node.js script facilitates deployment processes by automating Git branch management and executing commands as specified in a configuration file.
- Branch Management: Allows for interactive switching between local Git branches.
- Command Execution: Automatically runs a list of commands defined in a configuration file.
Define your operational parameters in a JSON file, specifying the working directory and the commands you want executed:
{
"cwd": "/path/to/working/directory",
"commands": ["npm install", "npm run build", "npm test"]
}
To run the script, execute it with the path to your configuration file:
npx cli-deployments --config=<path_to_config_file>
For a deploy_config.json
located in the same directory as the script:
npx cli-deployments --config=./deploy_config.json
Distributed under the MIT License. See LICENSE
for more information.