An ember-cli-deploy plugin to update a path in Firebase on activation
This plugin updates a path in Firebase with the latest version information when the deploy is activated.
The main use-case is to display a notification to your users when a version changes so they can reload to get changes.
A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.
For more information on what plugins are and how they work, please refer to the Plugin Documentation.
To get up and running quickly, do the following:
-
Ensure ember-cli-deploy-build is installed and configured.
-
Install this plugin
$ ember install ember-cli-deploy-notify-firebase
- Place the following configuration into
config/deploy.js
ENV.firebase {
app: '<your-firebase-app>',
token: '<your-firebase-token>'
}
- Run the pipeline & activate a deploy
$ ember deploy --activate
or
$ ember deploy
$ ember activate <version>
Run the following command in your terminal:
ember install ember-cli-deploy-notify-firebase
For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.
didActivate
For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.
The Firebase app to notify, the subdomain in https://.firebaseio.com
Default: null
A security token to authenticate with.
Default: null
The path to update in Firebase.
Default: '/release'
The data to update in Firebase.
By default this will contain the revision key and a timestamp.
Default:
{
"revision": "<revisionKey>",
"at": "<timestamp>"
}
A user can activate a revision by either:
- Passing a command line argument to the
deploy
command:
$ ember deploy --activate=true
- Running the
deploy:activate
command:
$ ember deploy:activate <revision-key>
- Setting the
activateOnDeploy
flag indeploy.js
ENV.pipeline {
activateOnDeploy: true
}
The following properties are expected to be present on the deployment context
object:
revisionData.revisionKey
(provided by ember-cli-deploy-revision-data)commandLineArgs.revisionKey
(provided by ember-cli-deploy)
npm test