forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will report what commits affect each publishable package and serves as an alternative to rust-lang#12085. CI can run this as `cargo changes HEAD~ HEAD^2` and that will capture all of the commits within the PR (this is the range I used in `committed`). There is still work needed to integrate this with an action; this is just a rough base-line implementation. I originally tried to use `cargo package --list` to determine what files belong to what packages but that was taking too long for some reason (it works well in `cargo release` for my crates). We can either look into that in the future or do our own heuristics to filter out content.
- Loading branch information
Showing
6 changed files
with
497 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "xtask-changes" | ||
version = "0.0.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] | ||
anyhow.workspace = true | ||
cargo.workspace = true | ||
clap.workspace = true | ||
env_logger.workspace = true | ||
git-conventional.workspace = true | ||
git2.workspace = true | ||
log.workspace = true | ||
semver.workspace = true | ||
termcolor.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
mod xtask; | ||
|
||
fn main() { | ||
env_logger::init_from_env("CARGO_LOG"); | ||
let cli = xtask::cli(); | ||
let matches = cli.get_matches(); | ||
|
||
let mut config = cargo::util::config::Config::default().unwrap_or_else(|e| { | ||
let mut eval = cargo::core::shell::Shell::new(); | ||
cargo::exit_with_error(e.into(), &mut eval) | ||
}); | ||
if let Err(e) = xtask::exec(&matches, &mut config) { | ||
cargo::exit_with_error(e, &mut config.shell()) | ||
} | ||
} |
Oops, something went wrong.