From ab5b044744990c99003cf90b74fc0f22642d2d20 Mon Sep 17 00:00:00 2001 From: Or Grinberg Date: Sun, 16 Jun 2024 20:23:47 +0100 Subject: [PATCH] Update shuttle version --- src/gen/mod.rs | 2 +- src/gen/templates/deployment_shuttle.t | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gen/mod.rs b/src/gen/mod.rs index 48b792fb3..f9a15dc04 100644 --- a/src/gen/mod.rs +++ b/src/gen/mod.rs @@ -38,7 +38,7 @@ const DEPLOYMENT_SHUTTLE_T: &str = include_str!("templates/deployment_shuttle.t" const DEPLOYMENT_SHUTTLE_CONFIG_T: &str = include_str!("templates/deployment_shuttle_config.t"); const DEPLOYMENT_NGINX_T: &str = include_str!("templates/deployment_nginx.t"); -const DEPLOYMENT_SHUTTLE_RUNTIME_VERSION: &str = "0.38.0"; +const DEPLOYMENT_SHUTTLE_RUNTIME_VERSION: &str = "0.46.0"; const DEPLOYMENT_OPTIONS: &[(&str, DeploymentKind)] = &[ ("Docker", DeploymentKind::Docker), diff --git a/src/gen/templates/deployment_shuttle.t b/src/gen/templates/deployment_shuttle.t index cbdbee5e9..cfba68518 100644 --- a/src/gen/templates/deployment_shuttle.t +++ b/src/gen/templates/deployment_shuttle.t @@ -18,7 +18,6 @@ injections: after: \[dependencies\] content: | shuttle-axum = "{{shuttle_runtime_version}}" - shuttle-metadata = "{{shuttle_runtime_version}}" shuttle-runtime = { version = "{{shuttle_runtime_version}}", default-features = false } {% if with_db -%} shuttle-shared-db = { version = "{{shuttle_runtime_version}}", features = ["postgres"] } @@ -28,16 +27,17 @@ use loco_rs::boot::{create_app, StartMode}; use loco_rs::environment::Environment; use {{pkg_name}}::app::App; {% if with_db %}use migration::Migrator;{% endif %} +use shuttle_runtime::DeploymentMetadata; #[shuttle_runtime::main] async fn main( {% if with_db %}#[shuttle_shared_db::Postgres] conn_str: String,{% endif %} - #[shuttle_metadata::ShuttleMetadata] meta: shuttle_metadata::Metadata, + #[shuttle_runtime::Metadata] meta: DeploymentMetadata, ) -> shuttle_axum::ShuttleAxum { {% if with_db %}std::env::set_var("DATABASE_URL", conn_str);{% endif %} let environment = match meta.env { - shuttle_metadata::Environment::Local => Environment::Development, - shuttle_metadata::Environment::Deployment => Environment::Production, + shuttle_runtime::Environment::Local => Environment::Development, + shuttle_runtime::Environment::Deployment => Environment::Production, }; let boot_result = create_app::(StartMode::ServerOnly, &environment) .await