-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Pre-release changes still not working [Bug] #158
Comments
I wanted to use your GitHub action in my GitHub worflow. Unfortunately I'm facing the same issue. |
As a workaround I use pysemver CLI now. Works great with pre-release versions as well. |
Also |
I have the same issue.
@SwabianCoder how did you solve this? This is my workflow file: |
@HarelM I use pysemver CLI to compare versions. This works great.
|
Can you link to a GitHub action with this? |
Thanks @SwabianCoder!! I have switched to a very basic comparison based on your code. See the above linked PR. |
@HarelM But based on that comparison you can't determine whether version increased. What if someone decreased it instead? |
Yes, that's true, but every PR is reviewed before merged, and we have branch protection, so I hope it's good enough, worst case I'll improve it later on, I needed to release a pre release, this was my number one goal... |
@EndBug Using it on prerelease versions like And you are comparing versions from remote and local Lines 100-119 at src/main.ts if (
(local.match(semverRegex()) || [])[0] !=
(remote.match(semverRegex()) || [])[0]
) {
output('changed', true)
output('version', staticChecking == 'localIsNew' ? local : remote)
output(
'type',
staticChecking == 'localIsNew'
? semverDiff(remote, local)
: semverDiff(local, remote)
)
endGroup()
info(
`Found match for version ${
staticChecking == 'localIsNew' ? local : remote
}`
)
} See codesandbox demo here: https://codesandbox.io/p/devbox/interesting-euclid-4wkr5g solution proposal: const versionDiff = staticChecking == 'localIsNew'
? semverDiff(remote, local)
: semverDiff(local, remote);
if (versionDiff) {
output('changed', true)
output('version', staticChecking == 'localIsNew' ? local : remote)
output('type', versionDiff)
endGroup()
info(
`Found match for version ${
staticChecking == 'localIsNew' ? local : remote
}`
)
} |
This issue should be fixed by the awesome work by @kusyka911 🎉 |
@all-contributors please add @bayssmekanique for bug |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Is it possible to add to the readme the possible values of |
@HarelM Good point, I should mention in the docs that the definition of the type is dependent on the |
@all-contributors please add @HarelM for their docs contribution |
I've put up a pull request to add @HarelM! 🎉 |
Describe the bug
Using the
diff-search: true
option, pre-release changes are not properly detected.To Reproduce
Moving from
"version": "2.5.0-beta.0"
to"version": "2.5.0-beta.1"
in thepackage.json
file results in the following output:Expected behavior
Should result in
changed: true
.Additional details
While digging for this issue I came to lines 394-396 of the
main.ts
file where I suspect the issue resides, though I don't know the output of the included package to determine if this is indeed the issue.version-check/src/main.ts
Lines 394 to 396 in 0a49022
The text was updated successfully, but these errors were encountered: