1 | 'use strict';
|
2 | const open = require('open');
|
3 | const newGithubReleaseUrl = require('./new-github-release-url');
|
4 | const {getTagVersionPrefix} = require('./util');
|
5 | const version = require('./version');
|
6 |
|
7 | module.exports = async (options, pkg) => {
|
8 | const newVersion = version(pkg.version).getNewVersionFrom(options.version);
|
9 | const tag = await getTagVersionPrefix(options) + newVersion;
|
10 |
|
11 | const url = newGithubReleaseUrl({
|
12 | repoUrl: options.repoUrl,
|
13 | tag,
|
14 | body: options.releaseNotes(tag),
|
15 | isPrerelease: version(options.version).isPrerelease()
|
16 | });
|
17 |
|
18 | await open(url);
|
19 | };
|