Skip to content

Commit b6f7087

Browse files
monkpowjonathanrainer
authored andcommitted
[BGS-138] [feature] add message for all rover users that Rover functionality has changed.
1 parent 4b76923 commit b6f7087

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

src/command/dev/do_dev.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use semver::Version;
1313
use tower::ServiceExt;
1414

1515
use crate::command::dev::router::config::{RouterAddress, RouterHost, RouterPort};
16+
use super::version_upgrade_message::VersionUpgradeMessage;
1617
use crate::command::dev::router::hot_reload::HotReloadConfigOverrides;
1718
use crate::command::dev::router::run::RunRouter;
1819
use crate::command::dev::{OVERRIDE_DEV_COMPOSITION_VERSION, OVERRIDE_DEV_ROUTER_VERSION};
@@ -39,10 +40,7 @@ impl Dev {
3940
override_install_path: Option<Utf8PathBuf>,
4041
client_config: StudioClientConfig,
4142
) -> RoverResult<RoverOutput> {
42-
warnln!(
43-
"Do not run this command in production! It is intended for local development only.\n"
44-
);
45-
43+
VersionUpgradeMessage::print();
4644
let elv2_license_accepter = self.opts.plugin_opts.elv2_license_accepter;
4745
let skip_update = self.opts.plugin_opts.skip_update;
4846
let read_file_impl = FsReadFile::default();

src/command/dev/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ mod do_dev;
99
mod no_dev;
1010
#[cfg(feature = "composition-js")]
1111
mod router;
12+
mod version_upgrade_message;
1213

1314
use std::net::IpAddr;
1415

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![warn(missing_docs)]
2+
use rover_std::Style;
3+
4+
pub struct VersionUpgradeMessage {}
5+
6+
impl VersionUpgradeMessage {
7+
pub fn print() {
8+
eprintln!();
9+
eprintln!(
10+
"{}",
11+
Style::WarningPrefix.paint("** Notice: Changes in This Release! **")
12+
);
13+
eprintln!("This version includes significant updates to the `rover dev` command.");
14+
eprintln!("We highly recommend reviewing the updated documentation to ensure a smooth experience.");
15+
eprintln!("Read more: https://www.apollographql.com/docs/rover/commands/dev");
16+
eprintln!();
17+
}
18+
}

0 commit comments

Comments
 (0)