Closed hellais closed 7 years ago
The full version string has been introduced already and being generated upon image build.
Using a lepidopter_version
file with the raw version number is a useful thing to have.
@hellais is git describe --abbrev=0
output a good match for that?
Yeah that would work, though maybe we should be also committing this to the repository to make it clear that is the location where you can find it and how it looks like.
@hellais what do you mean by: committing this to the repository
?
I mean there should be a file inside of https://github.com/TheTorProject/lepidopter/tree/master/lepidopter-fh/etc/default
called lepidopter_version
that contains the above mentioned string.
Is there a way to do this automatically in Github? Otherwise every person that submits a PR need to change the version of the file?
I prefer to have the version generated when the image is being build unless there is a good reason to always generate the lepidopter_version
on every commit.
If I understand correctly how you are setting it (based on the output of git describe --abbrev=0
) it only needs to be updated every time you tag a new release.
Currently git describe --tags
is being used.
git describe --abbrev=0
will be introduced in the future release. I still don't understand the usefulness of it being on a file in the git repository that already show the version of the files.
Manually generating this file upon every new release can increase the probability of failure in case one will accidentally forget to include this in the current version and the lepidopter_version
file will have the older version instead.
It just makes it more clear to somebody that wants to use this file that it's present on the filesystem.
It's also a pretty standard thing to do to have the version information be committed inside of the code repository and not have to depend on external tools (such a git to obtain it).
Implemented in #71.
Currently the lepidopter image ships with a file called
/etc/default/lepidopter
that contains some version information, though it appears to only mention the label of the version (ex.LEPIDOPTER_BUILD="alpha"
) and not the actual full version string.This should be a problem if we decide to make some future major releases that are also going to be in alpha.
I would also advise we change the format of the version to be something that is easier to be parsed (for example just including the raw version number) and perhaps place it inside of a more standard file (such as
/etc/lepidopter_version
similarly to how debian does it).For backward compatibility reasons I would say we keep both files
/etc/default/lepidopter
being the variable and/etc/lepidopter_version
being the raw version number.