Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: temporarily disable cargo publishes #228

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions xtask/src/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::{Context, Result};
use camino::Utf8PathBuf;
use structopt::StructOpt;

use crate::tools::{CargoRunner, GitRunner};
use crate::tools::GitRunner;

#[derive(Debug, StructOpt)]
pub(crate) struct Publish {
Expand All @@ -11,7 +11,7 @@ pub(crate) struct Publish {
}

impl Publish {
pub fn run(&self, verbose: bool) -> Result<()> {
pub fn run(&self, _verbose: bool) -> Result<()> {
let git_runner = GitRunner::new(true)?;

// Check if (git) HEAD is pointing to a package tag
Expand All @@ -22,7 +22,7 @@ impl Publish {
.get_package_tag()
.context("There are no valid package tags pointing to HEAD.")?;

let workspace_directory = package_tag.get_workspace_dir().with_context(|| {
let _workspace_directory = package_tag.get_workspace_dir().with_context(|| {
format!(
"Could not find the workspace directory for {}",
&package_tag,
Expand All @@ -41,11 +41,17 @@ impl Publish {
// to accompany it, change the function signature to
// PackageGroup::get_library(&self) -> Option<LibraryCrate>
// and handle it here.
let cargo_runner = CargoRunner::new(verbose)?;
cargo_runner.publish(
&package_tag.package_group.get_library(),
&workspace_directory,
)?;

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !! TODO: uncomment the following block to re-enable cargo publishes !!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

// let cargo_runner = CargoRunner::new(verbose)?;
// cargo_runner.publish(
// &package_tag.package_group.get_library(),
// &workspace_directory,
// )?;

Ok(())
}
}
1 change: 1 addition & 0 deletions xtask/src/tools/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl CargoRunner {
Ok(())
}

#[allow(dead_code)]
pub(crate) fn publish(
&self,
library_crate: &LibraryCrate,
Expand Down