Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Commit 108c10b

Browse files
fix #38 by respecting spaces around version tag
1 parent 7f9a964 commit 108c10b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# VERSION_FILE_PATH: Directory.Build.props
3838

3939
# Regex pattern to extract version info in a capturing group
40-
# VERSION_REGEX: <Version>(.*)<\/Version>
40+
# VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
4141

4242
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
4343
# VERSION_STATIC: 1.0.0
@@ -67,7 +67,7 @@ Input | Default Value | Description
6767
PROJECT_FILE_PATH | | Filepath of the project to be packaged, relative to root of repository
6868
PACKAGE_NAME | | NuGet package id, used for version detection & defaults to project name
6969
VERSION_FILE_PATH | `[PROJECT_FILE_PATH]` | Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
70-
VERSION_REGEX | `<Version>(.*)<\/Version>` | Regex pattern to extract version info in a capturing group
70+
VERSION_REGEX | `^\s*<Version>(.*)<\/Version>\s*$` | Regex pattern to extract version info in a capturing group
7171
VERSION_STATIC| | Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
7272
TAG_COMMIT | `true` | Flag to toggle git tagging, enabled by default
7373
TAG_FORMAT | `v*` | Format of the git tag, `[*]` gets replaced with actual version

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
VERSION_REGEX:
1616
description: Regex pattern to extract version info in a capturing group
1717
required: false
18-
default: ^<Version>(.*)<\/Version>$
18+
default: ^\s*<Version>(.*)<\/Version>\s*$
1919
VERSION_STATIC:
2020
description: Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
2121
required: false

0 commit comments

Comments
 (0)