Skip to content

Commit

Permalink
chore: update more ant_releases references
Browse files Browse the repository at this point in the history
The `SafeReleaseRepoActions` type was renamed to `AntReleaseRepoActions` and the
`ReleaseType::Autonomi` variant was changed to `ReleaseType::Ant`.
  • Loading branch information
jacderida committed Dec 2, 2024
1 parent 5861576 commit db9a198
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ant-node-manager/src/cmd/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
helpers::{download_and_extract_release, get_bin_version},
print_banner, ServiceManager, VerbosityLevel,
};
use ant_releases::{ReleaseType, SafeReleaseRepoActions};
use ant_releases::{AntReleaseRepoActions, ReleaseType};
use ant_service_management::{
control::{ServiceControl, ServiceController},
DaemonService, NodeRegistry,
Expand Down Expand Up @@ -44,7 +44,7 @@ pub async fn add(
service_manager.create_service_user(service_user)?;

let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?;
let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();

let (daemon_src_bin_path, version) = if let Some(path) = src_path {
let version = get_bin_version(&path)?;
Expand Down
6 changes: 3 additions & 3 deletions ant-node-manager/src/cmd/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
use ant_evm::{EvmNetwork, RewardsAddress};
use ant_logging::LogFormat;
use ant_peers_acquisition::PeersArgs;
use ant_releases::{ReleaseType, SafeReleaseRepoActions};
use ant_releases::{AntReleaseRepoActions, ReleaseType};
use ant_service_management::{
control::ServiceController, get_local_node_registry_path, NodeRegistry,
};
Expand Down Expand Up @@ -58,7 +58,7 @@ pub async fn join(
let local_node_reg_path = &get_local_node_registry_path()?;
let mut local_node_registry = NodeRegistry::load(local_node_reg_path)?;

let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();

let antnode_bin_path = get_bin_path(
build,
Expand Down Expand Up @@ -183,7 +183,7 @@ pub async fn run(
}
info!("Launching local network");

let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();

let antnode_bin_path = get_bin_path(
build,
Expand Down
6 changes: 3 additions & 3 deletions ant-node-manager/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
helpers::{download_and_extract_release, get_bin_version},
print_banner, VerbosityLevel,
};
use ant_releases::{ReleaseType, SafeReleaseRepoActions};
use ant_releases::{AntReleaseRepoActions, ReleaseType};
use ant_service_management::UpgradeResult;
use color_eyre::{eyre::eyre, Result};
use colored::Colorize;
Expand Down Expand Up @@ -47,7 +47,7 @@ pub async fn download_and_get_upgrade_bin_path(
return Ok((path, bin_version.parse()?));
}

let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();
if let Some(version) = version {
debug!("Downloading provided version {version} of {release_type}");
let (upgrade_bin_path, version) = download_and_extract_release(
Expand Down Expand Up @@ -136,7 +136,7 @@ pub async fn get_bin_path(
path: Option<PathBuf>,
release_type: ReleaseType,
version: Option<String>,
release_repo: &dyn SafeReleaseRepoActions,
release_repo: &dyn AntReleaseRepoActions,
verbosity: VerbosityLevel,
) -> Result<PathBuf> {
if build {
Expand Down
4 changes: 2 additions & 2 deletions ant-node-manager/src/cmd/nat_detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
config::get_node_registry_path, helpers::download_and_extract_release, VerbosityLevel,
};
use ant_peers_acquisition::get_peers_from_url;
use ant_releases::{ReleaseType, SafeReleaseRepoActions};
use ant_releases::{AntReleaseRepoActions, ReleaseType};
use ant_service_management::{NatDetectionStatus, NodeRegistry};
use color_eyre::eyre::{bail, OptionExt, Result};
use libp2p::Multiaddr;
Expand Down Expand Up @@ -59,7 +59,7 @@ pub async fn run_nat_detection(
let nat_detection_path = if let Some(path) = path {
path
} else {
let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();

let (nat_detection_path, _) = download_and_extract_release(
ReleaseType::NatDetection,
Expand Down
4 changes: 2 additions & 2 deletions ant-node-manager/src/cmd/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
use ant_evm::{EvmNetwork, RewardsAddress};
use ant_logging::LogFormat;
use ant_peers_acquisition::PeersArgs;
use ant_releases::{ReleaseType, SafeReleaseRepoActions};
use ant_releases::{AntReleaseRepoActions, ReleaseType};
use ant_service_management::{
control::{ServiceControl, ServiceController},
rpc::RpcClient,
Expand Down Expand Up @@ -86,7 +86,7 @@ pub async fn add(
config::get_service_log_dir_path(ReleaseType::AntNode, log_dir_path, service_user.clone())?;

let mut node_registry = NodeRegistry::load(&config::get_node_registry_path()?)?;
let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();

let (antnode_src_path, version) = if let Some(path) = src_path.clone() {
let version = get_bin_version(&path)?;
Expand Down
6 changes: 3 additions & 3 deletions ant-node-manager/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// KIND, either express or implied. Please review the Licences for the specific language governing
// permissions and limitations relating to use of the SAFE Network Software.

use ant_releases::{get_running_platform, ArchiveType, ReleaseType, SafeReleaseRepoActions};
use ant_releases::{get_running_platform, AntReleaseRepoActions, ArchiveType, ReleaseType};
use ant_service_management::NodeServiceData;
use color_eyre::{
eyre::{bail, eyre},
Expand Down Expand Up @@ -49,7 +49,7 @@ pub async fn configure_winsw(dest_path: &Path, verbosity: VerbosityLevel) -> Res
}
debug!("Downloading WinSW to {dest_path:?}");

let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();

let mut pb = None;
let callback = if verbosity != VerbosityLevel::Minimal {
Expand Down Expand Up @@ -120,7 +120,7 @@ pub async fn download_and_extract_release(
release_type: ReleaseType,
url: Option<String>,
version: Option<String>,
release_repo: &dyn SafeReleaseRepoActions,
release_repo: &dyn AntReleaseRepoActions,
verbosity: VerbosityLevel,
download_dir_path: Option<PathBuf>,
) -> Result<(PathBuf, String)> {
Expand Down
4 changes: 2 additions & 2 deletions node-launchpad/src/node_mgmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ant_node_manager::{
add_services::config::PortRange, config::get_node_registry_path, VerbosityLevel,
};
use ant_peers_acquisition::PeersArgs;
use ant_releases::{self, ReleaseType, SafeReleaseRepoActions};
use ant_releases::{self, AntReleaseRepoActions, ReleaseType};
use ant_service_management::NodeRegistry;
use color_eyre::eyre::{eyre, Error};
use color_eyre::Result;
Expand Down Expand Up @@ -305,7 +305,7 @@ struct NodeConfig {
async fn run_nat_detection(action_sender: &UnboundedSender<Action>) {
info!("Running nat detection....");

let release_repo = <dyn SafeReleaseRepoActions>::default_config();
let release_repo = <dyn AntReleaseRepoActions>::default_config();
let version = match release_repo
.get_latest_version(&ReleaseType::NatDetection)
.await
Expand Down

0 comments on commit db9a198

Please sign in to comment.