Closed Program-Monkey closed 7 years ago
The problem is that during setup stage pm2-deploy doesn't use --no-single-branch
flag while cloning git repo. In newer git versions without that flag only one branch which is referenced by --branch argument will be fetched.
Also this makes impossible to have different branches deployed because there will not be any other ref except the one from the --branch argument.
In newer git version is ok. The problem just on server which use git-1.8.3.1 . I see lots of yum source was used git-1.8.3.1 (つ#_#つ)
This is just a suggestion, in order to be compatible with git old version
I think this problem can be solved with pm2-deploy , check the git version before fetch the commit , if git version is < 1.8.3.x :
use older version (0.2.0) shell : git fetch --all
use refspec ::
shell : git fetch $ref (like origin test) : $$ref(like refs/remotes/origin/master) --depth=5 --tags