forked from rust-lang/crates.io
-
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.
smoke_test: Create initial git commit before running `cargo package/p…
…ublish` This is a workaround for a cargo bug (rust-lang/cargo#14354).
- Loading branch information
Showing
2 changed files
with
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use crate::exit_status_ext::ExitStatusExt; | ||
use std::path::Path; | ||
use tokio::process::Command; | ||
|
||
#[allow(unstable_name_collisions)] | ||
pub async fn add_all(project_path: &Path) -> anyhow::Result<()> { | ||
Command::new("git") | ||
.args(["add", "--all"]) | ||
.current_dir(project_path) | ||
.status() | ||
.await? | ||
.exit_ok() | ||
.map_err(Into::into) | ||
} | ||
|
||
#[allow(unstable_name_collisions)] | ||
pub async fn commit(project_path: &Path, message: &str) -> anyhow::Result<()> { | ||
Command::new("git") | ||
.args(["commit", "--message", message]) | ||
.current_dir(project_path) | ||
.status() | ||
.await? | ||
.exit_ok() | ||
.map_err(Into::into) | ||
} |
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