You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This extends the init script so it tries harder to get version
tags:
- As before, locally, "git fetch --all --tags" is always run. (This
also fetches other objects, and the developer experience would be
undesirably inconsistent if that were only sometimes done.)
- On CI, run it if version tags are absent. The criterion followed
here and in subsequent steps is that if any existing tag starts
with a digit, or with the letter v followed by a digit, we regard
version tags to be present. This is to balance the benefit of
getting the tags (to make the tests work) against the risk of
creating a very confusing situation in clones of forks that
publish packages or otherwise use their own separate versioning
scheme (especially if those tags later ended up being pushed).
- Both locally and on CI, after that, if version tags are absent,
try to copy them from the original gitpython-developers/GitPython
repo, without copying other tags or adding that repo as a remote.
Copy only tags that start with a digit, since v+digit tags aren't
currently used in this project (though forks may use them). This
is a fallback option and it always displays a warning. If it
fails, another message is issued for that. Unexpected failure to
access the repo terminates the script with a failing exit status,
but the absence of version tags in the fallback remote does not,
so CI jobs can continue and reveal which tests fail as a result.
On GitHub Actions CI specifically, the Actions syntax for creating
a warning annotation on the workflow is used, but the warning is
still also written to stderr (as otherwise). GHA workflow
annotations don't support multi-line warnings, so the message is
adjusted into a single line where needed.
0 commit comments