mottosso / bleeding-rez

Rez - Reproducible software environments for Windows, Linux and MacOS
GNU Lesser General Public License v3.0
71 stars 10 forks source link

rez build --version #38

Open mottosso opened 5 years ago

mottosso commented 5 years ago

Goal

Alternative to specifying a version from within the package.py.

Motivation

I was looking to generate lots of versions of a given package programmatically, but quickly realised there wasn't any way to specify a version other than by editing the package.py prior to calling rez build --install.

Beyond that, in porting an existing package management system to Rez, one of the differences was that the version wasn't given within the package definition, but rather during release.

$ other-system release --version 1.0.0

There isn't anything inherently wrong the current way versions are specified with Rez I think, nor with this other-system. However most of the time, changes you make are to the payload like Python module and so rather than having to also update the package.py due to technicalities, you could simply pass a version via the command-line.

These are essentially two different mindsets to releasing/installing packages. The current system has the advantage of being very specific, as one would need to remember the current version in order to increment properly, or look it up amongst released packages. The other-system didn't have to worry about that, because packages were published in context with the previous packages; in a GUI that visualised the currently available versions, which carried the additional benefit of visually indicating whether a chosen version was available or misformatted interactively.

Implementation

Provide an override to the version in package.py in the Rez CLI.

$ rez build --install --version 1.0

Extras

This could also be helpful for debugging, development and tutorials.

mottosso commented 5 years ago

Continued from https://github.com/nerdvegas/rez/issues/633