versioning, again #114

Closed
opened 3 months ago by hannes · 2 comments
hannes commented 3 months ago
Owner

we had some work on versioning and rewriting version numbers. but on FreeBSD, there is still an issue:
albatross-1.5.0.20220516175739.a0d5a2658fca39b527839c0f6a40195ac405cd1cc9078c080b872a53d20fb93a.pkg
albatross-1.5.0.3.g26b5a59.20220527144359.0bc1809bea3e010dc0c9e39905036018d3bb5f91cf905c172d367de6a33b0e8c.pkg

it looks like the 1.5.0.2022... is greater than 1.5.0.3.g...

we had some work on versioning and rewriting version numbers. but on FreeBSD, there is still an issue: albatross-1.5.0.20220516175739.a0d5a2658fca39b527839c0f6a40195ac405cd1cc9078c080b872a53d20fb93a.pkg albatross-1.5.0.3.g26b5a59.20220527144359.0bc1809bea3e010dc0c9e39905036018d3bb5f91cf905c172d367de6a33b0e8c.pkg it looks like the 1.5.0.2022... is greater than 1.5.0.3.g...
Poster
Owner

The underlying issue is a mix of git commits and tagged releases, and dune subst executing git describe --always --dirty (which outputs either the tag name for the actual tag, or tag-#commits-#sha for other commits (that are behind a tag)).

A solution in the git world would be to use git describe --always --dirty --long, but (a) this flexibility is not exposed via dune subst and (b) sometimes we are building from actual tarballs, not git repos, this may be unavailable.

So, as an alternative, our FreeBSD-repo.sh could enhance the version number accordingly: expecting a tag of the form major.minor.patch, it could detect whether the version is a tag or a commit:

  • 1.5.0
  • 1.5.0.3.g26b5a59

And if a tag is found, append ".0.g0000000".

NOTE: the version is added in the create_package.sh scripts, and there already sed -e s/-/./g is used -- thus 1.5.0-3-g26b5a59 becomes 1.5.0.3.g26b5a59.

The underlying issue is a mix of git commits and tagged releases, and `dune subst` executing `git describe --always --dirty` (which outputs either the tag name for the actual tag, or tag-#commits-#sha for other commits (that are behind a tag)). A solution in the git world would be to use `git describe --always --dirty --long`, but (a) this flexibility is not exposed via `dune subst` and (b) sometimes we are building from actual tarballs, not git repos, this may be unavailable. So, as an alternative, our FreeBSD-repo.sh could enhance the version number accordingly: expecting a tag of the form major.minor.patch, it could detect whether the version is a tag or a commit: - 1.5.0 - 1.5.0.3.g26b5a59 And if a tag is found, append ".0.g0000000". NOTE: the version is added in the create_package.sh scripts, and there already `sed -e s/-/./g` is used -- thus 1.5.0-3-g26b5a59 becomes 1.5.0.3.g26b5a59.
Poster
Owner

fixed with #115

fixed with #115
hannes closed this issue 3 months ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.