From 81095222ff9b4af35ed0112040548298e2143d65 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Fri, 9 Dec 2022 02:26:39 -0600 Subject: [PATCH] Get the version from Cargo.toml --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94f566c..c507f3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -669,7 +669,7 @@ dependencies = [ [[package]] name = "movie_rename" -version = "0.1.0" +version = "1.1.2" dependencies = [ "load_file", "tmdb", diff --git a/Cargo.toml b/Cargo.toml index 5a54c06..77d5638 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "movie_rename" -version = "0.1.0" +version = "1.1.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index f572a98..4eadd6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,9 @@ use tmdb::{model::*, themoviedb::*}; use torrent_name_parser::Metadata; use youchoose; -const VERSION: &str = "1.1.2"; +// Get the version from Cargo.toml +const VERSION: &str = env!("CARGO_PKG_VERSION"); + // Struct for movie entries struct MovieEntry { title: String,