nebula-release-plugin
nebula-release-plugin copied to clipboard
"force" option/parameter for provided tasks to allow pushing of tags to protected branch
I'm trying to configure this plugin for my java app, but my "main" branch is protected. Running "./gradlew final" involves a git push at some point, to get the tags back to origin. However, even when ran on a branch, the task still tries to push against main and I get a TransportException.
Execution failed for task ':release'.
Error: [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > org.eclipse.jgit.api.errors.TransportException: https://github.com/<org>/<repo-name>: connection failed
I tried a manual force push from my local machine
git push -f origin --tags
which managed to get through. I checked the documentation but couldn't find a list of accepted parameters (such as the -Prelease.scope) listed anywhere, so I'm unsure if what I'm after already exists.
Basically, I need a way to tell the "final" task (or any other) to use "-f" when executing. Is that available, or could it be implemented?