Tool to execute terminal commands in parallel.
$ semaphore create 2
$ semaphore add -- docker build
$ semaphore add -- vagrant up
$ semaphore add -- ansible-playbook
$ semaphore wait --timeout=1m --notify
Full description of the idea is available here.
...
Usage: semaphore COMMAND
Semaphore provides functionality to execute terminal commands in parallel.
Commands:
create is a command to init a semaphore context
-debug
show error stack trace
-filename string
an absolute path to semaphore context (default "/tmp/semaphore.json")
add is a command to add a job into a semaphore context
-debug
show error stack trace
-edit
switch to edit mode to read arguments from input (not implemented yet)
-filename string
an absolute path to semaphore context (default "/tmp/semaphore.json")
wait is a command to execute a semaphore task
-debug
show error stack trace
-filename string
an absolute path to semaphore context (default "/tmp/semaphore.json")
-notify
show notification at the end (not implemented yet)
-speed int
a velocity of report output (characters per second)
-timeout duration
timeout for task execution (default 1m0s)
Version 4.0.0 (commit: ..., build date: ..., go version: go1.9, compiler: gc, platform: darwin/amd64)
$ semaphore create 2
$ semaphore add -- bash -c "cd /tmp; \
git clone [email protected]:kamilsk/semaphore.git \
&& cd semaphore \
&& echo 'semaphore at revision' \$(git rev-parse HEAD) \
&& rm -rf /tmp/semaphore"
$ semaphore add -- bash -c "cd /tmp; \
git clone [email protected]:kamilsk/retry.git \
&& cd retry \
&& echo 'retry at revision' \$(git rev-parse HEAD) \
&& rm -rf /tmp/retry"
$ semaphore wait
$ brew install kamilsk/tap/semaphore
$ curl -sSL https://bit.ly/install-semaphore | sh
# or
$ wget -qO- https://bit.ly/install-semaphore | sh
# use standard go tools
$ go get -u github.com/kamilsk/semaphore
# or use egg tool
$ egg tools add github.com/kamilsk/semaphore
$ semaphore completion bash > /path/to/bash_completion.d/semaphore.sh
$ semaphore completion zsh > /path/to/zsh-completions/_semaphore.zsh
1 The project is still in prototyping.β©
made with β€οΈ for everyone