1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This is an ideal end-state for functionality
# Other files can be combined, but watch out for overwriting identical target names!
supplemental_files:
# If this isn't true, requirments won't be checked before running the target(s)
always_check_requirements: true
# These checks require a single, well-formed SemVer version string as output from the command
version_requirements:
- command: "docker version --format {{.Client.Version}}" # 20.10.23
minimum_version: "20.10.7"
maximum_version: "21.0.0"
- command: "python --version" # Python 3.9.13
# Splits on spaces and grabs the last output token,
# useful for avoiding bash manipulation of output
split: true
minimum_version: "3.8"
file_requirements: # Verify that these files exist
- path: "Cargo.toml"
- path: "example_rox.yml"
create_if_not_exists: true # Create the file if it doesn't exist
targets:
#------------------------------------------------
# This section is for unimplemented functionality
#------------------------------------------------
# Run only the specified params, errors if no match
# rox docker_build -foo prod
- name: cargo
parameters:
- symbol: foo # Rox will look for and replace $foo in both the command and arguments
values:
command: "cargo $foo"
description: "Run various cargo subcommands/tools"
#------------------------------------------------
# This section is for _already_ implemented functionality
#------------------------------------------------
- name: db
description: "Build the application dockerfile"
command: "docker build . -t rox:local"
- name: dr
description: "Run 'help' for the packaged Docker application"
command: "docker run rox:local"
pre_targets:
- name: wr
command: "cargo watch -c -x run"
description: "Run the application, restarting on file changes"
- name: clippy_ci
command: "cargo clippy -D warnings"
- name: clippy
command: "cargo clippy"
- name: test
command: "cargo test"
description: "Run tests"
pre_targets:
post_targets:
- name: run
description: "Runs the 'help' command as a basic test"
command: "cargo run -h"
- name: pc
description: "All things to run before a commit"
pre_targets: # It is valid to have no command if there are pre/post targets instead