6.0.1 • Published 10 months ago

ember-cli-app-version v6.0.1

Weekly downloads
132,016
License
MIT
Repository
github
Last release
10 months ago

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 v14 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.

6.0.1

10 months ago

6.0.0

1 year ago

5.0.0

3 years ago

4.0.0

4 years ago

3.2.0

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

7 years ago

2.1.0

7 years ago

3.0.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.3.5

9 years ago

0.4.0

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago