From 0089888cd755764810bce8e021177317c3341891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gon=C3=A7alves?= Date: Tue, 28 Sep 2021 19:00:01 +0200 Subject: [PATCH] rust2rpm: replace hyphens by underscores in version - fix issue#124 --- rust2rpm/metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust2rpm/metadata.py b/rust2rpm/metadata.py index b29e7b5..c0ce530 100644 --- a/rust2rpm/metadata.py +++ b/rust2rpm/metadata.py @@ -75,9 +75,9 @@ class CargoSemVer: version_str = f'{version.major}.{version.minor or 0}' \ f'.{version.patch or 0}' if version.pre_release: - version_str = f'{version_str}{sep}{version.pre_release}' + version_str = f'{version_str}{sep}{version.pre_release.replace("-", "_")}' if version.build: - version_str = f'{version_str}+{version.build}' + version_str = f'{version_str}+{version.build.replace("-", "_")}' return version_str @staticmethod