From c2e98029a85fdd184ee3219d19c4a8ba8c51f0c1 Mon Sep 17 00:00:00 2001 From: Pierre Cavaroc <7305493+Invvard@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:27:49 -0500 Subject: [PATCH] Add VersionPrefix regex to props files --- src/plugins/props-plugin.ts | 6 ++++++ test-files/expected-results/Test.props | 1 + test-files/input/Test.props | 1 + 3 files changed, 8 insertions(+) diff --git a/src/plugins/props-plugin.ts b/src/plugins/props-plugin.ts index af34425..76322d2 100644 --- a/src/plugins/props-plugin.ts +++ b/src/plugins/props-plugin.ts @@ -1,6 +1,7 @@ import Plugin, { PluginVersionRegex, VersionPartDelimiter } from "./plugin"; const VERSION_TAG_REGEX: RegExp = /(.*)<\/Version>/i; +const VERSION_PREFIX_TAG_REGEX: RegExp = /(.*)<\/VersionPrefix>/i; const ASSEMBLY_VERSION_TAG_REGEX: RegExp = /(.*)<\/AssemblyVersion>/i; const FILE_VERSION_TAG_REGEX: RegExp = /(.*)<\/FileVersion>/i; @@ -15,6 +16,11 @@ export default class PropsPlugin extends Plugin versionPartDelimiter: VersionPartDelimiter.DOT, versionType: " tag" }, + { + regex: VERSION_PREFIX_TAG_REGEX, + versionPartDelimiter: VersionPartDelimiter.DOT, + versionType: " tag" + }, { regex: ASSEMBLY_VERSION_TAG_REGEX, versionPartDelimiter: VersionPartDelimiter.DOT, diff --git a/test-files/expected-results/Test.props b/test-files/expected-results/Test.props index ec88772..5277b40 100644 --- a/test-files/expected-results/Test.props +++ b/test-files/expected-results/Test.props @@ -1,5 +1,6 @@ 4.5.6 + 4.5.6 diff --git a/test-files/input/Test.props b/test-files/input/Test.props index 1a25e79..ecaca05 100644 --- a/test-files/input/Test.props +++ b/test-files/input/Test.props @@ -1,5 +1,6 @@ 1.2.3 + 1.2.3