-
Notifications
You must be signed in to change notification settings - Fork 26
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
Crash when trying to update first ever release #16
Comments
Update: It does not seem to depend on whether only one release is uploaded or an arbitrary number of releases. |
BreadMoirai
added a commit
that referenced
this issue
Mar 11, 2019
remote metaClass extensions and some unnecessary logging info
I've applied your suggested changes, please try out version 2.2.5. |
Wow, that's a pretty big commit. Not sure if I can understand all your changes. But anyway, I'll check it out later today. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When there is only exactly one release on GitHub, and you're re-running
githubRelease
, the plugin fails to find the last commit hash:Stack trace
When running
gradlew githubRelease --stacktrace
the second time, I get this output:Cause
I've looked it up in the plugin's code, and I think I have found the cause.
In
ChangeLogSupplier.groovy
at line 115 you're assuming, the next release could be queried by simply incrementing the list index.But when there's only one release on Github, and the tag is the same as the release, we're trying to upload, this assumption fails, and Gradle throws an
IndexOutOfBoundsException
.Fix
I think this issue could be fixed by checking, whether, if only one release is returned by the API, that is the same as the one we're trying to upload.
In that case we would proceed just like we would normally do, if there wouldn't be a release at all.
So we only need to replace line 99 with the following check:
The text was updated successfully, but these errors were encountered: