Skip to content

Commit

Permalink
chore(cli): Use short git versions in the elect version proposal title
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Jul 18, 2023
1 parent 1af2cf4 commit 56ce8a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rs/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use clap::{error::ErrorKind, CommandFactory, Parser};
use ic_canisters::governance_canister_version;
use ic_management_types::requests::NodesRemoveRequest;
use ic_management_types::{MinNakamotoCoefficients, Network, NodeFeature};
use itertools::Itertools;
use std::collections::BTreeMap;
use std::str::FromStr;

Expand Down Expand Up @@ -185,10 +186,10 @@ async fn main() -> Result<(), anyhow::Error> {
let (_, versions) = runner.prepare_versions_to_retire(false).await?;
let ic_admin = ic_admin::Cli::from_opts(&cli_opts, true).await?;
let new_replica_info = ic_admin::Cli::prepare_to_propose_to_bless_new_replica_version(version, rc_branch_name).await?;
let proposal_title = if !versions.is_empty() {
Some(format!("Elect new replica binary revision (commit {}), and retire old replica versions {}", version, versions.join(",")))
let proposal_title = if versions.is_empty() {
Some(format!("Elect new replica binary revision (commit {})", &version[..8]))
} else {
Some(format!("Elect new replica binary revision (commit {})", version))
Some(format!("Elect new replica binary revision (commit {}), and retire old replica versions {}", &version[..8], versions.iter().map(|v| &v[..8]).join(",")))
};

ic_admin.propose_run(ic_admin::ProposeCommand::UpdateElectedReplicaVersions{
Expand Down

0 comments on commit 56ce8a8

Please sign in to comment.