shipitjs / shipit-deploy

Set of deployment tasks for Shipit based on git and rsync commands.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there an argument to specify branch from CLI or at least set "current branch"?

AntJanus opened this issue · comments

I'm trying to setup an environment for branch previews so that I could easily preview various branches; however, I don't see a way to set the branch in CLI like you can in capistrano with cap staging -S branch=whatever-branch-name deploy. I didn't see an option to say "deploy current branch" either.

Any ideas on how to set this up?

It is a config option: https://github.com/shipitjs/shipit-deploy#branch

If you want to do it as a cli option, you set it using https://github.com/substack/minimist or yargs.
E.g.

{
  branch: require('minimist')(process.argv).branch
}

Same could be done if you want "current checked out branch" using something like https://github.com/jonschlinkert/git-branch

Thanks! :)