Deployer: Clone Git Tag rather than branch

Created on 8 Feb 2016  路  2Comments  路  Source: deployphp/deployer

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.

Most helpful comment

Deployer should log a notice if an unsupported git version is used

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antonmedv picture antonmedv  路  5Comments

lsv picture lsv  路  4Comments

ovaiskhan11 picture ovaiskhan11  路  4Comments

osbulbul picture osbulbul  路  3Comments

minkbear picture minkbear  路  4Comments