A couple of issues (https://github.com/deployphp/deployer/issues/532 and https://github.com/deployphp/deployer/issues/120) reference Git and Tags but neither seem to show a solution that works.
Using --tag tagname pulls from HEAD.
Using ->env('tag', 'prodv1.0.4') also fails and pulls from HEAD with the warning;
warning: Remote branch prodv1.0.4 not found in upstream origin, using HEAD instead.
Is this feature in Deploy3? I am using Deployer3, PHP5.5.30.
It doesn't seem to be covered in any of the documentation suggesting that one must either pull from the HEAD or a branch and that tags are not supported at all?
Using -vvv I can see that the command is
git clone -b prodv1.0.4 --depth 1 --recursive -q [email protected]:blah/myrepo.git
Its that command that gives the above warning. However if I run git clone -b prodv1.0.4 --depth 1 --recursive -q [email protected]:blah/myrepo.git myself from my local machine that it runs fine and clones the correct tag.
OK so after further investigation, my staging server has a really old version of Git, therefore it cannot pull tags using -b and therefore tries to find a branch named "prodv1.0.4" which fails.
Deployer should log a notice if an unsupported git version is used
Most helpful comment
Deployer should log a notice if an unsupported git version is used