Skip to content

Commit bcf1629

Browse files
author
Moritz Schmitz von Hülst
authored
Fix issue when append_to_pre_release_tag is set (#38)
* If append_to_prerelease_tag is set it should be used as identifier to lookup the latest prerelease tag. * 5.0.1 * small refactor
1 parent a2cbb4e commit bcf1629

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-tag-action",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"private": true,
55
"description": "A GitHub Action to automatically bump and tag master, on merge, with the latest SemVer formatted version.",
66
"main": "lib/main.js",

src/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ async function run() {
4343
.some((branch) => currentBranch.match(branch));
4444
const isPrerelease = !isReleaseBranch && isPreReleaseBranch;
4545

46+
const identifier = appendToPreReleaseTag ? appendToPreReleaseTag : currentBranch;
4647
const validTags = await getValidTags();
4748
const latestTag = getLatestTag(validTags);
4849
const latestPrereleaseTag = getLatestPrereleaseTag(
4950
validTags,
50-
currentBranch
51+
identifier
5152
);
5253

5354
const commits = await getCommits(latestTag.commit.sha);
@@ -94,7 +95,7 @@ async function run() {
9495
const incrementedVersion = inc(
9596
previousTag,
9697
releaseType,
97-
appendToPreReleaseTag ? appendToPreReleaseTag : currentBranch
98+
identifier
9899
);
99100

100101
if (!incrementedVersion) {

0 commit comments

Comments
 (0)