Skip to content

Make it work #1

@balupton

Description

@balupton

Originally from: docpad/docpad#254

Now that the extensible cli is done. Having a heroku plugin would be awesome. Here's the requirements:

  1. Check if the heroku remote exists, if it doesn't then
    1. Check if gem exists, if it doesn't, tell them to install it, direct to a wiki page
    2. Check if heroku gem is installed, if it isn't, ask the user if they want it installed
    3. Check if they are logged in with the heroku gem, if not, get them to login
    4. Display a list of their heroku apps, ask if they want to use one or create a new one, if create a new one, what name should it use
    5. With the app they chose, add its git url as the heroku remote
  2. Deploy to the heroku remote

Alternatively, we can use the rest api instead, which would work like so:

  1. Check if the heroku remote exists, if it doesn't then
    1. Run heroku auth:token, and use the result. If it fails, ask for the user's heroku token
    2. Use the heroku token and rest api to fetch a list of apps
    3. List the apps to the user, ask them if they want to use one, or create a new one, if create a new one, what name should it have
    4. With the app they chose, fetch its heroku remote, and add it to the git repo
  2. Deploy to the heroku remote

We can also use the git api to setup a post hook to redeploy to heroku whenever master changes - link: http://developer.github.com/v3/repos/hooks/

Other steps:

  1. Will need to add a ssh key to heroku for docpad in order to do the git pushes to heroku
  2. Will need to create server.js, Procfile, package.json>main, and config.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions