Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still creating new releases when no commits present #218

Open
luketainton opened this issue Jul 15, 2024 · 1 comment
Open

Still creating new releases when no commits present #218

luketainton opened this issue Jul 15, 2024 · 1 comment

Comments

@luketainton
Copy link

The readme says that if no commits are present, new_tag should be undefined. However it appears that when no commits are present, it is using default_bump instead.

Output from GitHub Actions run:
Screenshot 2024-07-15 at 19 50 27

Specifically these logs:

Previous tag was v0.2.0, previous version was 0.2.0.
Analysis of 0 commits complete: no release
New version is 0.3.0.
@chrisleves
Copy link

well the doc is not clear

it says

new_tag - The value of the newly calculated tag. Note that if there hasn't been any new commit, this will be undefined.
new_version - The value of the newly created tag without the prefix. Note that if there hasn't been any new commit, this will be undefined.

but also says

default_bump (optional) - Which type of bump to use when none is explicitly provided when commiting to a release branch (default: patch). You can also set false to avoid generating a new tag when none is explicitly provided. Can be patch, minor or major.
default_prerelease_bump (optional) - Which type of bump to use when none is explicitly provided when commiting to a prerelease branch (default: prerelease). You can also set false to avoid generating a new tag when none is explicitly provided. Can be prerelease, prepatch, preminor or premajor.

overall the code is doing this

// Determine if we should continue with tag creation based on main vs prerelease branch
let shouldContinue = true;
if (isPrerelease) {
if (!bump && defaultPreReleaseBump === 'false') {
shouldContinue = false;
}
} else {
if (!bump && defaultBump === 'false') {
shouldContinue = false;
}
}

since the default value for bump or defaultBump are patch and prerelease, the shouldContinue is always true!!

I still don't fully understand how it should behave !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants