Skip to content

Commit

Permalink
Use correct version when creating release draft (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaodingyd authored and itaisteinherz committed Jun 24, 2019
1 parent 287506a commit ff5e21a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ module.exports = async (input = 'patch', options) => {
title: 'Creating release draft on GitHub',
enabled: () => isOnGitHub === true,
skip: () => !options.releaseDraft,
task: () => releaseTaskHelper(options)
task: () => releaseTaskHelper(options, pkg)
});

await tasks.run();
Expand Down
6 changes: 4 additions & 2 deletions source/release-task-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ const newGithubReleaseUrl = require('./new-github-release-url');
const {getTagVersionPrefix} = require('./util');
const version = require('./version');

module.exports = async options => {
const tag = await getTagVersionPrefix(options) + options.version;
module.exports = async (options, pkg) => {
const newVersion = version(pkg.version).getNewVersionFrom(options.version);
const tag = await getTagVersionPrefix(options) + newVersion;

const url = newGithubReleaseUrl({
repoUrl: options.repoUrl,
tag,
Expand Down

0 comments on commit ff5e21a

Please sign in to comment.