-
Notifications
You must be signed in to change notification settings - Fork 11
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
Release task should work in "detached HEAD" state #6
Comments
Hi @tschulte and thanks for making this plugin! I am a big fan of We use Gitlab-CI for our CI jobs, thanks to Release process failed, reverting back any changes made by Release Plugin
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task \':api:preTagCommit\'.
> Failed to push to remote - [[fatal: invalid refspec \'(HEAD detached from 2a50e314) I have tried to disable the branch check, but being in a detached state is forbidden by the plugin. I see this issue is quite old, do you know how I can get through? Thanks in advance, |
@tschulte, as I see, to accomplish two tasks you mentioned, we could accept branch name from somewhere else. So these are not the problems. Another question is how original |
@kopax, correct me if I'm wrong. If yes, then this is senseless and won't work. When I was talking about But your idea - to run Gradle from UPDATE: |
@grv87 I got lucky because KengoTODA's released that like two days ago. I have tested it and it was working only if I did my own build from master. Yes, I have found this plugin too complexe to work, I have tried to remove the 2nd tag from gradle release etc.... I believe this can be done, but as you said without this plugin. I have tested KengoTODA's implementation and I am very satisfied with it. Thanks for the quick reply @grv87 |
Thanks for pointing to KengaTODA's implementation. I have not known it yet. That is a very interesting approach to call node instead of gradle when doing a release and updating gradle.properties. That way only the build server needs to use node and the devs can use gradle in their day-to-day work. And only the build server needs node installed. The first idea would mean to call node from gradle during configuration phase and set the version. That might be a performance problem. But the advantage would be not having to commit the version and thus being more true to the idea of semantic release. |
This is related to ajoberstar/gradle-git#137.
As stated in ajoberstar/gradle-git#137, CI servers do not always checkout the branch, but the latest commit of the branch instead, therefore operating in detached HEAD state. The plugin does however check the branch name
master
andrelease
-branches are allowed)This will create problems when building in detached HEAD state.
The text was updated successfully, but these errors were encountered: