Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jberghoef/run
A task runner with YAML configuration files.
https://github.com/jberghoef/run
Last synced: 3 days ago
JSON representation
A task runner with YAML configuration files.
- Host: GitHub
- URL: https://github.com/jberghoef/run
- Owner: jberghoef
- Created: 2019-02-25T17:09:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-12T10:05:11.000Z (about 4 years ago)
- Last Synced: 2024-11-08T11:59:02.807Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# run
## Features
- Execute commands wherever you are. Will automatically detect the closest
Runfile.
- Add additional logic to your commands, such as templates and optional
executions.## Installation
```golang
go get -u -v github.com/jberghoef/run
go install -v github.com/jberghoef/run
```## Usage
```bash
run # Run the entire Runfile closest the the current directory.
run echo # Run a command named 'echo' in the first Runefile found.
run echo test # Run a command named 'echo' and 'test'.
```### Flags
```bash
run --file ../src/Runfile.yaml # Run the entire Runfile provided.
run --file ../src/Runfile.yaml test # Run a command named 'test' in the Runfile provided.
run --debug test # Run a command named 'test', use debug logging.
```## Example file
```yaml
echo: echo hello world # Execute a command directly.
home: echo ${HOME} # Use existing environment variables.test: # Execute a list of commands.
- echo halt
- echo and
- echo catch
- echo firesomething:
optional: Would you like to print something? # Mark a command as optional.
commands:
- echo say
- echo {{.Something}} # Use templates to enter values before executing.
- echo lovinganything:
command: echo {{.Something}} # Previously entered values will be remembered.test2:
env: # Set environment variables before executing.
ENV_VALUE_2: halt and catch fire
ENV_VALUE_3: ✋ 🔥
commands:
- echo ${ENV_VALUE_2}
- echo ${ENV_VALUE_3}
- :echo # Reference an other command in your file.
```