Skip to content

Commit

Permalink
removed hardcoded version in snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaicalinluca committed May 24, 2024
1 parent 3752387 commit fa37055
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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]
Expand All @@ -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"] }}
Expand Down

0 comments on commit fa37055

Please sign in to comment.