0

The idea is to trigger npm version patch to increase the version from 1.2.3 to 1.2.4 once you press the button of the image:

Merge pull request

So every change in the develop's branch means a new build version in the application.

I have tried using .git/hooks/post-merge and running the command if the merged branch name is develop. It works but only if I perform a merge in the console of visual studio but not when clicking the bitbucket merge button.

I'm also trying to create a java maven plugin with the developer atlassian SDK but i'm not getting this working, it's outdated with not too much documentation and i'm not even succeed in the build process.

Any idea?

David
  • 614
  • 5
  • 20

1 Answers1

0

This should be part of the CI/CD pipeline, rather than sitting in a git hook.

On merge to your master (assumption) branch, you should have a task within your pipeline that tags the sha of master. You can easily achieve this with tools such as Travis, CircleCI, Jenkins etc.

steadweb
  • 15,364
  • 3
  • 33
  • 47