Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-cli-app-version

ember-cli260.6kMIT7.0.0

Adds App version number to Ember Inspector Info Tab

ember-addon

readme

ember-cli-app-version

CI NPM Version Ember Observer Score

Adds your Ember App's version to Info tab in Ember Inspector. The version is taken from your project's package.json#version. If you add build metadata to the version, this addon will automatically append SHA to the end of the version.

Compatibility

  • Ember.js v3.28 or above
  • Ember CLI v3.28 or above
  • Node.js v18 or above

Installation

ember install ember-cli-app-version

Usage

Ember Inspector Info Tab

{{app-version}} helper

This addon provides {{app-version}} helper that allows you to show your current app version in your app.

The addon has flags to display parts of the version:

  • {{app-version versionOnly=true}} // => 2.0.1
  • {{app-version versionOnly=true showExtended=true}} // => 2.0.1-alpha.1
  • {{app-version shaOnly=true}} // => <git SHA>

Flags are false by default.

Heroku

When running on Heroku the .git folder is not present, making it impossible to fetch the git SHA. A workaround for this is adding the below in your config/environment.js:

// Heroku Git Hash support
if (process.env.SOURCE_VERSION) {
  const pkg = require('../package.json');
  const hash = process.env.SOURCE_VERSION.substr(0, 7);
  ENV['ember-cli-app-version'] = {
    version: `${pkg.version}+${hash}`,
  };
}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

changelog

Changelog

v7.0.0 (2024-06-10)

:boom: Breaking Change

:rocket: Enhancement

:house: Internal

Committers: 1

v6.0.1 (2023-06-15)

:bug: Bug Fix

  • #410 Loosen peer dependency to indicate support for ember 5 (@jacobnlsn)

:house: Internal

Committers: 2

v6.0.0 (2023-02-02)

:boom: Breaking Change

  • #388 Drop support for Ember versions below v3.28, Drop support for Node versions below v14 (@rpemberton)

:rocket: Enhancement

  • #398 Remove use of @ember/string to avoid ember-string.add-package deprecation (@bertdeblock)

:house: Internal

  • #392 Remove config/environment.js entry from files in package.json file (@bertdeblock)

Committers: 3

v5.0.0 (2021-03-08)

:boom: Breaking Change

:house: Internal

Committers: 2

v4.0.0 (2020-10-09)

:boom: Breaking Change

:rocket: Enhancement

  • #68 Replace git-repo-version dependency with git-repo-info (@luxferresum)

:house: Internal

Committers: 4