Skip to content

ember-cli-deploy addon for executing shell commands during deploy process

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

joebartels/ember-cli-deploy-sh

Repository files navigation

Build Status

Ember-cli-deploy-sh

An ember-cli-deploy plugin to run shell commands during deploy.

Configuration Options

hooks

Supports all will* and did* hooks:
willDeploy, willBuild, willPrepare, willUpload, willActivate
didBuild, didPrepare, didUpload, didActivate, didDeploy, didFail

Each hook takes an array of tasks

config/deploy.js

ENV.sh = {
  hooks: {
    willDeploy: [ {task} ]
  }
};

task

A task is a shell commands defined in a JS Object.

command

  • the shell command to execute

options

  • the arguments to include with the shell command
  • are passed directly into dargs during formatting

This is an example of a task that makes a curl request:

// config/deploy.js

require('dotenv').load(); // ember-cli-deploy v0.6.0x has native support for .env
var querystring = require('querystring');

Env.sh = {
  hooks: {
    didDeploy: [
      {
        command: 'curl',
        options: {
          request: 'POST',
          form: ['file=@dist-deploy/index.html', 'version=' + process.env.VERSION,
          verbose: true,
          url: buildURL('https://api.com/new-release', { pass: process.env.PASSWORD })
        }
      }      
    ]
  }
};

function buildURL(url, options) {
  return url + '?' + querystring.stringify(options);
}

About

ember-cli-deploy addon for executing shell commands during deploy process

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •