Unitech / pm2-deploy

Deploy part of PM2
http://pm2.keymetrics.io/docs/usage/deployment/
MIT License
178 stars 71 forks source link

Is it forbidden to deploy a branch name has slashes? #139

Closed daiwhea closed 6 years ago

daiwhea commented 7 years ago

https://github.com/Unitech/pm2-deploy/blob/a3398fdd56afb39a43039a7864635688843b39e6/deploy#L210

I have a branch named as origin/deploy/test . When I want to setup for a new server. It keeps complain:

Cloning into '/data/web/xxxx/source'...
warning: Could not find remote branch test to clone.
fatal: Remote branch daiwhea not found in upstream origin

Can I deploy a branch which name containes slashes[/] ?

Change the code above to *local branch=${ref#/}** will be ok.

Thanks.

vmarchaud commented 7 years ago

Feel free to make a PR so we can publish the fix :)

phra commented 6 years ago

yep, i think we can fix this.

EDIT: already fixed, closing this.