https://github.com/minutebase/ember-cli-deploy-notify-firebase
Notify Firebase of deploys
https://github.com/minutebase/ember-cli-deploy-notify-firebase
Last synced: about 1 year ago
JSON representation
Notify Firebase of deploys
- Host: GitHub
- URL: https://github.com/minutebase/ember-cli-deploy-notify-firebase
- Owner: minutebase
- License: mit
- Created: 2015-10-01T22:23:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T16:13:07.000Z (over 8 years ago)
- Last Synced: 2025-04-11T18:06:57.473Z (about 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 2
- Watchers: 0
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-cli-deploy-notify-firebase
> An ember-cli-deploy plugin to update a path in Firebase on activation
[](http://ember-cli-deploy.github.io/ember-cli-deploy-version-badges/)
This plugin updates a path in Firebase with the latest version information when the deploy is activated.
## Why would I want to do that?
The main use-case is to display a notification to your users when a version changes so they can reload to get changes.
## What is an ember-cli-deploy plugin?
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][1].
## Quick Start
To get up and running quickly, do the following:
- Ensure [ember-cli-deploy-build][2] is installed and configured.
- Install this plugin
```bash
$ ember install ember-cli-deploy-notify-firebase
```
- Place the following configuration into `config/deploy.js`
```javascript
ENV.firebase {
app: '',
token: ''
}
```
- Run the pipeline & activate a deploy
```bash
$ ember deploy --activate
```
or
```bash
$ ember deploy
$ ember activate
```
## Installation
Run the following command in your terminal:
```bash
ember install ember-cli-deploy-notify-firebase
```
## ember-cli-deploy Hooks Implemented
For detailed information on what plugin hooks are and how they work, please refer to the [Plugin Documentation][1].
- `didActivate`
## Configuration Options
For detailed information on how configuration of plugins works, please refer to the [Plugin Documentation][1].
### app
The Firebase app to notify, the subdomain in https://.firebaseio.com
*Default:* `null`
### token
A security token to authenticate with.
*Default:* `null`
### path
The path to update in Firebase.
*Default:* `'/release'`
### payload
The data to update in Firebase.
By default this will contain the revision key and a timestamp.
*Default:*
```json
{
"revision": "",
"at": ""
}
```
### How do I activate a revision?
A user can activate a revision by either:
- Passing a command line argument to the `deploy` command:
```bash
$ ember deploy --activate=true
```
- Running the `deploy:activate` command:
```bash
$ ember deploy:activate
```
- Setting the `activateOnDeploy` flag in `deploy.js`
```javascript
ENV.pipeline {
activateOnDeploy: true
}
```
## Prerequisites
The following properties are expected to be present on the deployment `context` object:
- `revisionData.revisionKey` (provided by [ember-cli-deploy-revision-data][4])
- `commandLineArgs.revisionKey` (provided by [ember-cli-deploy][3])
## Running Tests
- `npm test`
[1]: http://ember-cli.github.io/ember-cli-deploy/plugins "Plugin Documentation"
[2]: https://github.com/ember-cli-deploy/ember-cli-deploy-build "ember-cli-deploy-build"
[3]: https://github.com/ember-cli/ember-cli-deploy "ember-cli-deploy"
[4]: https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data "ember-cli-deploy-revision-data"