install.fairie/.config/taskfiles/install/Taskfile-rust.yml
Brian Zalewski f42899b107 Latest
2022-12-24 15:04:59 -05:00

61 lines
1.2 KiB
YAML

---
version: '3'
tasks:
bundle:
deps:
- grex
- htmlq
- hyperfine
catfs:
run: once
cmds:
- task: install:rust
vars:
BIN_NAME: catfs
PACKAGE: catfs
clean:
cmds:
- rm -rf "$HOME/.cargo/registry"
grex:
run: once
cmds:
- task: install:rust
vars:
BIN_NAME: grex
PACKAGE: grex
htmlq:
run: once
cmds:
- task: install:rust
vars:
BIN_NAME: htmlq
PACKAGE: htmlq
hyperfine:
run: once
cmds:
- task: install:rust
vars:
BIN_NAME: hyperfine
PACKAGE: hyperfine
install:rust:
vars:
BIN: '{{if .BIN_NAME}}{{.BIN_NAME}}{{else}}{{.PACKAGE}}{{end}}'
run: when_changed
log:
error: Failed to install Cargo crate `{{.PACKAGE}}`
start: Installing Cargo crate `{{.PACKAGE}}`
success: Installed Cargo crate `{{.PACKAGE}}`
cmds:
- task: :install:software:rust
- |
if [ -n "$CI" ]; then echo "*************** cargo --> {{.PACKAGE}}"; fi
- cargo install {{.PACKAGE}}
status:
- type {{.BIN}} > /dev/null || [ -n "$NO_INSTALL_RUST" ]