Skip to content

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Nov 20, 2024

This will ensure that setuptools-scm also works with git archive outputs, and not only with repo clones.

This will ensure that setuptools-scm also works with `git archive` outputs, and not only with repo clones.
@dweindl dweindl requested a review from dilpath November 20, 2024 13:39
Copy link
Collaborator

@dilpath dilpath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New to me but looks good, thanks!

@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the match? Is it because archives are created in other contexts in our workflow than GitHub releases?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's about which tags will be considered for the version names. E.g., a tag foo wouldn't be used. This can be restricted further if it's decided that we stick to vYYYY.MM.DD, but I think this will do for the moment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about the tag to create a GitHub release, right? I guess we want all GitHub releases to be properly versioned and then made available on PyPI (TODO) and Zenodo -- if there is a release that isn't tagged with *[0-9]*, then it was probably a mistake on our side?

Copy link
Member Author

@dweindl dweindl Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about any tags that may exist in the repository, whether they are created by a GitHub release or by any other means. This will also be used when archiving any revision that is not a release. The tag that will be used as the basis of the version number will be the one closest up the tree that matches the given pattern.

if there is a release that isn't tagged with [0-9], then it was probably a mistake on our side?

Yes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍 Thanks

@dweindl dweindl merged commit 429dd0f into master Nov 21, 2024
6 checks passed
@dweindl dweindl deleted the git_archival branch November 21, 2024 10:11
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

Successfully merging this pull request may close these issues.

3 participants