#!/bin/bash
git update-ref HEAD master
git checkout master
mvn release:prepare -B
mvn release:perform --settings deploy-settings.xml

#!/bin/bash
git update-ref HEAD refs/heads/master
git checkout master
mvn release:prepare -B
mvn release:perform --settings deploy-settings.xml

Update to update-ref to fix maven release plugin
Update to update-ref to fix maven release plugin