Skip to content

Commit 10b73c8

Browse files
authored
Merge pull request #98 from Lordfirespeed/actions-housekeeping
Strip build metadata from the software version
2 parents a8ddfb0 + f54eaba commit 10b73c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
name: "Thunderstore CLI ${{ needs.validate-tag.outputs.tag }}"
8787
body_path: ${{ github.workspace }}/.github/RELEASE_TEMPLATE.md
8888
draft: true
89-
prerelease: ${{ startsWith(steps.tag.outputs.tag, '0.') }}
89+
prerelease: ${{ startsWith(needs.validate-tag.outputs.tag, '0.') }}
9090

9191
nupkg:
9292
name: Build NuGet Package
@@ -119,4 +119,4 @@ jobs:
119119
name: "Thunderstore CLI ${{ needs.validate-tag.outputs.tag }}"
120120
body_path: ${{ github.workspace }}/.github/RELEASE_TEMPLATE.md
121121
draft: true
122-
prerelease: ${{ startsWith(steps.tag.outputs.tag, '0.') }}
122+
prerelease: ${{ startsWith(needs.validate-tag.outputs.tag, '0.') }}

ThunderstoreCLI/Utils/MiscUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public static int[] GetCurrentVersion()
2323
throw new Exception("Reading app version from assembly failed");
2424
}
2525

26-
// Drop possible pre-release cruft ("-alpha.0.1") from the end.
27-
var versionParts = version.Split('-')[0].Split('.');
26+
// Drop possible pre-release or build metadata cruft ("-alpha.0.1", "+abcde") from the end.
27+
var versionParts = version.Split('-', '+')[0].Split('.');
2828

2929
if (versionParts is null || versionParts.Length != 3)
3030
{

0 commit comments

Comments
 (0)