Convert as much scripts as possible to xtask
The shell scripts start to get more/too complex. We should migrate them to xtask as modules (or even libraries). Ideally, the only remaining script would be setup.sh to install enough things for xtask to run (probably rustup and build-essential).
Can use cargo_toml to parse Cargo.toml files. Description of configurations for cargo check and cargo test (from which cargo clippy are derived) can be in package.metadata like for package.metadata.docs.rs from which cargo doc is derived. Note that cargo fmt is always the same.
Other useful crates: git2, semver.
Related tasks:
- #448
- #583
We might want to also make use of cargo-script to keep the script feeling.
In addition to the logic in ci-changelog.sh regarding Cargo.toml files, an additional rule should be that publish = false crate should not use version in local dependencies (i.e. with path).
Another rule could be that optional dependencies should not define any features. The features should be added by the features that enable the dependency.