From fa3705500c7a582aa2edc7ec8cda5c031a4b7aa1 Mon Sep 17 00:00:00 2001 From: Mihai Calin Luca Date: Fri, 24 May 2024 15:16:44 +0300 Subject: [PATCH 1/2] removed hardcoded version in snippets --- .../cmd/contract/generate_snippets/snippet_crate_gen.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs b/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs index 7bf8ab8d5c..265f22b9c1 100644 --- a/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs +++ b/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs @@ -3,6 +3,8 @@ use std::{ io::Write, }; +use crate::version_history; + static SNIPPETS_SOURCE_FILE_NAME: &str = "interactor_main.rs"; pub(crate) fn create_snippets_folder(snippets_folder_path: &str) { @@ -52,6 +54,8 @@ pub(crate) fn create_snippets_cargo_toml( } }; + let last_release_version = &version_history::VERSIONS.last().unwrap().version; + writeln!( &mut file, r#"[package] @@ -69,10 +73,10 @@ path = "src/{SNIPPETS_SOURCE_FILE_NAME}" path = ".." [dependencies.multiversx-sc-snippets] -version = "0.50.1" +version = "{last_release_version}" [dependencies.multiversx-sc] -version = "0.49.0" +version = "{last_release_version}" [dependencies] clap = {{ version = "4.4.7", features = ["derive"] }} From 866428a57ee143d0eea1221faac243c513ab1e14 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Mon, 27 May 2024 11:01:09 +0300 Subject: [PATCH 2/2] snippet gen version fix --- .../src/cmd/contract/generate_snippets/snippet_crate_gen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs b/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs index 17776df54e..fc02e3f648 100644 --- a/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs +++ b/framework/meta/src/cmd/contract/generate_snippets/snippet_crate_gen.rs @@ -60,7 +60,7 @@ pub(crate) fn create_snippets_cargo_toml( } }; - let last_release_version = &version_history::VERSIONS.last().unwrap().version; + let last_release_version = &version_history::LAST_VERSION; writeln!( &mut file,