-
Notifications
You must be signed in to change notification settings - Fork 40
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
force date into a semver-compliant version #148
Conversation
I am testing this more in my fork now... |
Note further complicating testing is that my self-hosted runner is running Windows 10 20H2 ARM64, which cannot run x64 binaries. So I'm having to use my fork branch that installs 32-bit msys2. But, this version format seems to make it happy:
as opposed to:
|
@@ -46,14 +46,15 @@ function parseInput() { | |||
} | |||
|
|||
async function downloadInstaller() { | |||
const inst_path = tc.find('msys2-installer', inst_version, 'x64'); | |||
const version = `0.0.${inst_version.replace(/-/g, '')}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the problem with the follwing?
const version = `${inst_version.replace(/-/g, '.')}`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the last part only makes the version incompatible to all other versions according to semver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will add a comment about it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea. (though I don't know if anything does any semver related version comparison here, but that's one advantage I could think of)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what I was thinking is that if msys2 ever wanted to use 'real' versions, version numbers up to 2021 (or even newer) would be considered 'older' than version 1.0.
I do think there is some semver comparison going on in the tool-cache too.
The version with
year-month-day
was not passing a semver.valid check, and thus causing tool-cache to not find a previously-cached version. They really should fail when trying to cache an "invalid" version, if they're going to fail to find it later.