From 4f01c14faaf5a35dd9cca4ac234c55565cefc100 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Wed, 2 Sep 2015 00:04:12 -0400 Subject: [PATCH] Fixes poorly written config code #2920 #2875 --- RELEASE-NOTES.md | 1 + tasks/config/project/release.js | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index cefe2ca1c..0a7ce556b 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -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 diff --git a/tasks/config/project/release.js b/tasks/config/project/release.js index aa1b96526..e9b0d7117 100644 --- a/tasks/config/project/release.js +++ b/tasks/config/project/release.js @@ -15,18 +15,14 @@ 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 = { @@ -34,6 +30,13 @@ catch(error) { }; } +// looks for version in config or package.json (whichever is available) +version = (config && config.version !== undefined) + ? config.version + : packageJSON.version +; + + /******************************* Export *******************************/ @@ -56,6 +59,6 @@ module.exports = { + ' *' + '\n' + ' */' + '\n', - version : packageJSON.version + version : version };