Skip to content

Commit

Permalink
Fixes poorly written config code #2920 #2875
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Sep 2, 2015
1 parent 13661ce commit 4f01c14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
**[Reported Bugs](https://github.com/Semantic-Org/Semantic-UI/issues?q=is%3Aissue+milestone%3A2.1.0+is%3Aclosed)**
- **Accordion** - Added missing notation for accordion docs #2812
- **Build Tools** - Fixes issue where component glob `{tab, table}` caused table to be included twice in concatenated source **
- **Build Tools** - Fixed bug where `gulp version` would show `x.x` #2875 #2920
- **Button** - Fixes inverted button missing an `active` and `active focus` state #2635
- **Button** - Fixes issue where `basic button` would not have focus color text when colored #2264
- **Checkbox** - Clicking a link inside an initialized checkbox `label` will now work correctly, and will not toggle the checkbox. #2804
Expand Down
21 changes: 12 additions & 9 deletions tasks/config/project/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,28 @@ var
*******************************/

try {

config = requireDotFile('semantic.json');
packageJSON = require('../../../package.json');
}
catch(error) {}

// looks for version in config or package.json (whichever is available)
version = (config && config.version !== undefined)
? config.version
: packageJSON.version
;

try {
packageJSON = require('../../../package.json');
}

catch(error) {
// generate fake package
packageJSON = {
version: 'x.x'
};
}

// looks for version in config or package.json (whichever is available)
version = (config && config.version !== undefined)
? config.version
: packageJSON.version
;


/*******************************
Export
*******************************/
Expand All @@ -56,6 +59,6 @@ module.exports = {
+ ' *' + '\n'
+ ' */' + '\n',

version : packageJSON.version
version : version

};

0 comments on commit 4f01c14

Please sign in to comment.