-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 1.0.5 - Auto Generation of versio file (version bump for missed
dependency) Release 1.0.4 - Auto generation of version file This release adds an option to have the verison file generated based on the package.json file. Closes #11 - thanks to @elidupuis Add option to automatically generate a version file Set default `versionFileName` from `ember-cli-build` configuration Bumped package version Moved dependency to dev
- Loading branch information
Showing
7 changed files
with
74 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
import Ember from 'ember'; | ||
import NewVersionNotifier from 'ember-cli-new-version/components/new-version-notifier/component'; | ||
import NewVersionNotifier from './new-version-notifier'; | ||
export default NewVersionNotifier; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
/*jshint esnext:true */ | ||
|
||
import Ember from 'ember'; | ||
import config from '../config/environment'; | ||
import NewVersionNotifier from 'ember-cli-new-version/components/new-version-notifier/component'; | ||
export default NewVersionNotifier; | ||
|
||
let versionFileName = `/${config.newVersion.fileName}` || '/VERSION.txt'; | ||
|
||
export default NewVersionNotifier.extend({ | ||
versionFileName | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,43 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
|
||
var writeFile = require('broccoli-file-creator'); | ||
|
||
module.exports = { | ||
name: 'ember-cli-new-version' | ||
name: 'ember-cli-new-version', | ||
|
||
/* | ||
Store config from `ember-cli-build.js` | ||
*/ | ||
included: function(app, parentAddon) { | ||
this.options = app.options.newVersion || {}; | ||
|
||
if (this.options === true) { | ||
this.options = { fileName: 'VERSION.txt' }; | ||
} | ||
}, | ||
|
||
/* | ||
Set options on the environment configuration object so they can | ||
be accessed via `import config from '../config/environment';` | ||
*/ | ||
config: function(env, baseConfig) { | ||
if (this.options && this.options.fileName) { | ||
return { newVersion: this.options }; | ||
} | ||
}, | ||
|
||
/* | ||
Generate version file automatically | ||
based on package.json of consuming application. | ||
*/ | ||
treeForPublic: function() { | ||
var content = this.parent.pkg.version || ''; | ||
var fileName = this.options.fileName; | ||
|
||
if (this.options.fileName) { | ||
this.ui.writeLine('Created ' + fileName); | ||
return writeFile(fileName, content); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters