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

can't bottle a package with non-SemVer versioning #239

Closed
ddobrinskiy opened this issue Feb 13, 2023 · 3 comments
Closed

can't bottle a package with non-SemVer versioning #239

ddobrinskiy opened this issue Feb 13, 2023 · 3 comments

Comments

@ddobrinskiy
Copy link

This issue is a continuation of this discussion on discord

I'm trying to package mamba in 388, and it has weird version formatting i.e. 22.11.1-4

See releases here

Since tea currently forces SemVer formatting, this results in an error Uncaught (in promise) Error: invalid version: 22.11.1-4

Some examples of mamba versions here:

  • 22.11.1-4
  • 22.11.1-3
  • 22.11.1-2
  • 22.11.1-1
  • 22.11.1-0
  • 22.9.0-3
  • 22.9.0-2
  • 22.9.0-1
  • `22.9.0-0'

So it uses a semver plus a suffix

I wonder what's the solution here?

@mxcl
Copy link
Member

mxcl commented Feb 13, 2023

Yeah we have a few of these. Our plans are to address them one by one. OSS is full of weird versions for sure. Though our protocol will require semver (thankfully).

For other such things currently we:

versions:
  - 22.11.1.4

Then hardcode the version in the distributable.url as 22.11.1-4.

Our current idea for dealing with this going forwards is to allow packages to provide a custom version.anyext that provides a transformation into a standard dot separated form.

Sorry for the lack of clarity in our docs for this. We're still figuring it out.

With brew we allowed “anything” and this rapidly turned into a very messy regex file. This time round we want to ensure we are getting versions—however they occur in the wild—into a form we can understand.

@jhheider
Copy link
Contributor

Then hardcode the version in the distributable.url as 22.11.1-4.

imagemagick is the most recent example.

@mxcl mxcl transferred this issue from pkgxdev/pkgx Jun 7, 2023
@mxcl mxcl transferred this issue from pkgxdev/libpkgx Dec 23, 2023
mxcl added a commit that referenced this issue Jan 11, 2024
Required for eg image magick and many other projects
Refs #239
mxcl added a commit that referenced this issue Jan 11, 2024
Required for eg image magick and many other projects
Refs #239
@mxcl
Copy link
Member

mxcl commented Jan 11, 2024

Next brewkit allows a transform: key in versions that should contain a JS function that can transform versions. I am adapting image magick’s package yml to use it.

@mxcl mxcl closed this as completed Jan 11, 2024
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

3 participants