-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare dies if there are no tags yet - fatal: No names found, cannot describe anything #342
Comments
The One is Second, however, is |
In the second case when there is no old version we should build the changelog from the beginning of the repo. |
Quick workaround for posterity:
|
the |
this is not so simple -- the prepare scripts pass the previous version string to the script hooks. so there must be something for those. the quick start guide currently recommends tagging the first commit as 0.0.0 |
@asottile-sentry could you clarify why defaulting to "0.0.0" or similar as a return value of If some script hooks rely on the existence of the tag, I feel like we should just update those. We've hit this issue like 3+ (?) times already, and the quick start guide doesn't seem to help 😓 |
could you clarify what you mean by "doesn't seem to help"? if the directions are followed everything works 0.0.0 breaks several things including changelog generation and the copy pasted version bumping scripts |
People forget to check the instructions, miss that specific point, or think that they don't apply to their specific case. It just feels like something that can be fixed without too much effort and make people's lives easier, but I might be wrong about the "without too much effort" part, of course.
Do you have some of those in mind? IIRC not that many scripts actually rely on the existing/valid previous version. |
at a glance: $ all-repos-grep --repos '\$1' -- scripts/bump-version.sh
repos/getsentry/arroyo
repos/getsentry/chartcuterie
repos/getsentry/pytest-responses
repos/getsentry/raven-python
repos/getsentry/rb
repos/getsentry/responses
repos/getsentry/self-hosted
repos/getsentry/sentry
repos/getsentry/sentry-elixir
repos/getsentry/sentry-go
repos/getsentry/sentry-java
repos/getsentry/sentry-kotlin-multiplatform
repos/getsentry/sentry-native
repos/getsentry/sentry-php
repos/getsentry/sentry-python
repos/getsentry/sentry-rust
repos/getsentry/sentry-symfony
repos/getsentry/snuba
repos/getsentry/snuba-sdk
repos/getsentry/zeus-cli |
Yep, looks like most of those scripts will accept an empty string or "0.0.0" as the first argument without any issues, and they don't use the old version for anything there, e.g.: https://github.com/getsentry/arroyo/blob/main/scripts/bump-version.sh |
you've cherry picked the few that don't it seems -- most of them use it:
|
What I mean by "use" is that Take this one from your list, for example: https://github.com/getsentry/sentry-native/blob/master/scripts/bump-version.sh Yes, |
Sorry, that was bad example, but e.g. "${1}" in https://github.com/getsentry/snuba-sdk/blob/main/scripts/bump-version.sh is used inside a bash function, so it refers to a function argument, not to the script argument. |
Looks like there are now 4 independent reports of this so it is clear that whatever we have in place does not work or protect people against this well-known failure mode. My memory suggests that nothing in those scripts were relying on the Looks like if the script issue is resolved, it won't be too hard to default to the first commit for changelog generation? |
Steps to Reproduce
.craft.yml
file.craft prepare 0.0.0
.Expected Result
Successful completion.
Actual Result
Here's the call that fails:
craft/src/utils/git.ts
Lines 35 to 38 in 2ff325e
See:
The text was updated successfully, but these errors were encountered: