From 6face9305b1ff857f94d75dc494a4afa13d98175 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 3 Mar 2024 08:34:33 -0500 Subject: [PATCH] Fix reading metadata with Windows line endings --- build.rs | 2 +- docs/changelog.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 1acc41e..47ea958 100644 --- a/build.rs +++ b/build.rs @@ -369,7 +369,7 @@ fn get_distribution_source() -> String { fn set_project_from_metadata(metadata: &str, file_name: &str) { for item in ["Name", "Version"] { - match Regex::new(&format!("(?m)^{item}: (.+)$")) + match Regex::new(&format!(r"(?m)^{item}: (\S+)")) .unwrap() .captures(metadata) { diff --git a/docs/changelog.md b/docs/changelog.md index a4c76f0..80e012c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +***Fixed:*** + +- Fix reading metadata with Windows line endings during build time from embedded distributions + ## 0.15.0 - 2024-03-01 ***Added:***