crystal-lang / distribution-scripts

40 stars 24 forks source link

Update installer to install versioned packages #112

Closed straight-shoota closed 3 years ago

straight-shoota commented 3 years ago

We have versioned packages now on OBS (https://build.opensuse.org/project/show/devel:languages:crystal) for each minor release. This patch adapts the installer script to install these versioned packages when the --crystal argument is passed.

dentarg commented 3 years ago

This patch adapts the installer script to install these versioned packages when the --version argument is passed.

You mean --crystal, right?

straight-shoota commented 3 years ago

@dentarg Yes, I fixed that. Maybe it should really be --version? I now I've made that mistake not for the first time...

beta-ziliani commented 3 years ago

Maybe it should really be --version? I now I've made that mistake not for the first time...

Definitively, but it's a change that's not worth the breakage of people's own installation scripts

straight-shoota commented 3 years ago

This argument has been broken since bintray was replaced by OBS. It only worked for latest or a version number matching the currently latest release. So it's unlikely to be in widespread use. (And it was only introduced about a year ago)

Replacing it doesn't need to be a breaking change. We can just add --version as an alternative and show a deprecation message if --crystal is used. This can be separate change, but if we want to change that, we should do it before announcing (renewed) support for the version selector.

straight-shoota commented 3 years ago

@bcardiff Do you remember the reason to use --crystal instead of --version in the first place?

bcardiff commented 3 years ago

My motivation was to eventually support also --shards in case we split the deb packages. That's why I preferred --crystal instead of --version.

Also inspired in the GitHub Action that support specifying crystal and shards version independently.

straight-shoota commented 3 years ago

I think we can add a separate shards version with --shards-version if we want to. But I think --version feels just more natural for a Crystal installer.