Ember CLI Deploy Revision Data

3.0.0 · active · verified Wed Apr 22

The `ember-cli-deploy-revision-data` package is an `ember-cli-deploy` plugin designed to generate unique revision data for Ember application deployments. This data typically includes a `revisionKey`, often derived from a file hash (like `index.html`), git commit, or versioning information, and a timestamp. This allows other `ember-cli-deploy` plugins to track and utilize specific build revisions for purposes like caching, atomic deployments, or revision previews. The current stable version is 3.0.0, which updated dependencies and tightened Node.js version requirements (now 14.x, 16.x, 18.x, or >=20). As an Ember ecosystem plugin, its release cadence is generally tied to Ember CLI and Node.js LTS cycles. Key differentiators include its configurable data generation strategies (e.g., `file-hash`, `git-tag-commit`, `version-commit`), its seamless integration into the `ember-cli-deploy` pipeline, and its ability to provide idempotent revision keys, crucial for reliable cache invalidation and atomic deployments.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to install `ember-cli-deploy-revision-data` and configure it in your `config/deploy.js` to generate a `revisionKey` based on the `index.html` file hash, then run a basic deployment.

/* config/deploy.js */
module.exports = function(deployTarget) {
  let ENV = {
    build: {},
    'revision-data': {
      type: 'file-hash', // or 'git-tag-commit', 'git-commit', 'version-commit'
      filePattern: 'index.html', // default, can be customized
      distDir: function(context) {
        return context.distDir; // Uses context provided by ember-cli-deploy-build
      },
      distFiles: function(context) {
        return context.distFiles; // Uses context provided by ember-cli-deploy-build
      }
    }
  };

  // Example for a production deployment target
  if (deployTarget === 'production') {
    // Specific production settings can go here
    ENV.build.environment = 'production';
  }

  return ENV;
};

// In your terminal:
// Ensure ember-cli-deploy-build is installed first
// $ ember install ember-cli-deploy-build

// Install this plugin
// $ ember install ember-cli-deploy-revision-data

// Run the deployment pipeline
// $ ember deploy

view raw JSON →