Skip to content

Commit

Permalink
Merge pull request #18 from Updater/force-gitHead-override
Browse files Browse the repository at this point in the history
fix(withVersionHead): apply fallback iff plugin finds previous release
  • Loading branch information
pmowrer authored Jan 3, 2018
2 parents 9bca2b8 + 6be5c85 commit 99a00ad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/with-version-head.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const gitTag = require('./version-to-git-tag');
const withVersionHead = plugin => async (pluginConfig, options) => {
const release = await plugin(pluginConfig, options);

// TODO: Don't trust result of `plugin` for now since its likely
// `@semantic-release/npm` returning the wrong information.
return {
...release,
...(await getVersionHead(null, await gitTag(release.version))),
};
if (release) {
return {
...release,
...(await getVersionHead(null, await gitTag(release.version))),
};
}
};

module.exports = withVersionHead;

0 comments on commit 99a00ad

Please sign in to comment.