Skip to content

Commit

Permalink
build: release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Joxit committed Apr 17, 2021
1 parent 85fbaa0 commit 83ae113
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtasktic"
version = "0.3.0"
version = "0.4.0"
authors = ["Jones Magloire @Joxit"]
description = "Command-line task management tool for execution of regular long sequential or parallel tasks."
edition = "2018"
Expand All @@ -17,6 +17,6 @@ structopt = "^0.3"
yaml-rust = "^0.4"
linked-hash-map = "^0.5"
libc = "^0.2"
attohttpc = "^0.15"
attohttpc = "^0.17"
openssl = { version = "^0.10", features = ["vendored"] }
json = "^0.12"
49 changes: 39 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Describe your tasks in a YAML file, execute all of them with runtasktic in foreg
## CLI

```
runtasktic 0.2.0
runtasktic 0.4.0
Jones Magloire @Joxit
Command-line task management tool for execution of regular long sequential or parallel tasks.
Expand All @@ -30,34 +30,40 @@ FLAGS:
-V, --version Prints version information
SUBCOMMANDS:
dot Export the configuration to a graph (needs graphviz/dot)
exec Execute a single command with notification
help Prints this message or the help of the given subcommand(s)
run Run tasks
completion Generate completion script for your shell
dot Export the configuration to a graph (needs graphviz/dot)
exec Execute a single command with notification
help Prints this message or the help of the given subcommand(s)
run Run tasks
```

### Run: all tasks of a configuration file

```
runtasktic-run 0.2.0
runtasktic-run 0.4.0
Run tasks
USAGE:
runtasktic run [FLAGS] <config>
runtasktic run [FLAGS] [OPTIONS] [--] [config]...
FLAGS:
-b, --background Run the task in background
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-s, --start <starts>... Override the starting task if the job had already been started before. When using many
configuration files, start states must be in the first configuration file. Can be many
task ids with comma separated values
ARGS:
<config> Configuration path (YAML)
<config>... Configurations path (YAML)
```

### Exec: Simple command, just like nohup with notification

```
runtasktic-exec 0.2.0
runtasktic-exec 0.4.0
Execute a single command with notification
USAGE:
Expand All @@ -70,6 +76,7 @@ FLAGS:
OPTIONS:
-c, --config <config> Configuration path (YAML)
-t, --task <task> Run a single task from the configuration file
ARGS:
<command>... Command to execute
Expand All @@ -78,7 +85,7 @@ ARGS:
### Dot: Create a graph using graphviz of your configuration file

```
runtasktic-dot 0.2.0
runtasktic-dot 0.4.0
Export the configuration to a graph (needs graphviz/dot)
USAGE:
Expand All @@ -93,6 +100,28 @@ ARGS:
<image> Path for the image. `dot` command is required
```

### Completion: Generate completion script for your shell

```
runtasktic-completion 0.4.0
Generate completion script for your shell
USAGE:
runtasktic completion <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
bash Generates a .bash completion file for the Bourne Again SHell (BASH). Save the output in
`/etc/bash_completion.d/runtasktic` or `~/.local/share/bash-completion/completions/runtasktic`
elvish Generates a completion file for Elvish
fish Generates a .fish completion file for the Friendly Interactive SHell (fish)
help Prints this message or the help of the given subcommand(s)
zsh Generates a completion file for the Z SHell (ZSH)
```

## Configuration

```yaml
Expand Down
6 changes: 6 additions & 0 deletions src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ impl Run {
}
}

if self.config.is_empty() {
let clap = crate::Runtasktic::clap();
let args = format!("{} run --help", clap.get_name());
clap.get_matches_from(args.split(" "));
}

if self.background && unsafe { fork() } != 0 {
// The main process should return
return;
Expand Down

0 comments on commit 83ae113

Please sign in to comment.