javydreamercsw
javydreamercsw

Reputation: 5099

Update trunk with tag created with Maven Release plugin

I have a working Maven release process but I still need to do some manual tasks.

Here's a summary of the process:

  1. release:prepare
  2. release:perform

I run the above in the development branch. This of course creates a tag and then updates the branch with the next development version. In my case I would like it also to update trunk. I like to have trunk with the code of the latest release, but if I do a merge/pull it'll copy the new development version not the last release.

Is there a way to get in there or doing it manually is the only way?

Upvotes: 0

Views: 65

Answers (1)

Stanislav Bashkyrtsev
Stanislav Bashkyrtsev

Reputation: 15308

If you know the tag name you can simply:

git push origin release-x.y.z:refs/heads/master

Or if you know that the latest release is the previous commit, then:

git push origin HEAD~1:refs/heads/master

You can probably configure this via Maven SCM Plugin. But if there is a possibility that master was updated, then this would fail and you'd have to merge manually.

PS: Heh, there are still people who use Maven Release Plugin :)

Upvotes: 1

Related Questions