To give a context:
I am using researchgate plugin to change versions during gradle build. I want to restrict this to run only in 'develop' branch from which I will be deploying.
When I run this via bitbucket pipeline I belive bitbucket checks out to the commit (now it's in detached state as it doesn't belong to any branch) and so the build is failing.
Is there a workaround or a better alternative?