You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-04 13:50:28 +02:00
Xtask (#2688)
### Background Comprehensive Rust requires a number of tools to be installed (e.g. mdbook and mdbook-course). As mentioned in #2509 (and discussed in #2469) it would be nice to have a cross platform command for installing these dependencies. Currently these are installed using a shell script (`install-mdbook.sh`) but this isn't truly cross platform e.g. for Windows users. ### Xtask [xtask](https://github.com/matklad/cargo-xtask) outlines an approach for automating tasks in a Rust project. It involves using cargo's aliasing feature to allow us to run commands like `cargo xtask <some task>` to perform adhoc tasks via a Rust binary that we might otherwise need a shell script for. In this PR we add support for a `cargo xtask install-tools` command that will replace the `install-mdbook.sh` script and install the dependent tools. We can potentially extend it to support for other tasks e.g. `cargo xtask fmt`. --------- Co-authored-by: Eric Githinji <egithinji@google.com>
This commit is contained in:
2
.github/workflows/install-mdbook/action.yml
vendored
2
.github/workflows/install-mdbook/action.yml
vendored
@ -6,7 +6,7 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install mdbook
|
||||
run: ./install-mdbook.sh
|
||||
run: cargo xtask install-tools
|
||||
shell: bash
|
||||
|
||||
- name: Install dependencies for mdbook-pandoc
|
||||
|
Reference in New Issue
Block a user