Skip to content

Commit

Permalink
chore: removed --next and --actual
Browse files Browse the repository at this point in the history
  • Loading branch information
stvnwrgs committed Aug 11, 2016
1 parent df702f7 commit c609595
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 39 deletions.
30 changes: 4 additions & 26 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ var argv = require('yargs')
default: 'beta',
global: true
})
.option('actual', {
alias: 'a',
describe: 'get the actual version',
type: 'boolean',
default: false,
global: true
})
.option('next', {
alias: 'x',
describe: 'get the next version',
type: 'boolean',
default: false,
global: true
})
.help()
.alias('help', 'h')
.example('$0', 'Update changelog and tag release')
Expand All @@ -90,14 +76,6 @@ conventionalRecommendedBump({
console.error(chalk.red(err.message))
return
}
if (argv.actual) {
console.log(pkg.version)
return
}
if (argv.next) {
console.log(getNextVersion(release))
return
}
var newVersion = pkg.version
if (!argv.firstRelease) {
newVersion = getNextVersion(release)
Expand Down Expand Up @@ -133,10 +111,10 @@ function outputChangelog (argv, cb) {
var changelogStream = conventionalChangelog({
preset: 'angular'
})
.on('error', function (err) {
console.error(chalk.red(err.message))
process.exit(1)
})
.on('error', function (err) {
console.error(chalk.red(err.message))
process.exit(1)
})

changelogStream.on('data', function (buffer) {
content += buffer.toString()
Expand Down
13 changes: 0 additions & 13 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,6 @@ describe('cli', function () {
})
})

describe('dry runs', function () {
it('returns the current version when executed with -a', function () {
writePackageJson('1.0.0')
execCli('-a').stdout.should.equal('1.0.0\n')
})

it('returns the current version when executed with -a', function () {
writePackageJson('1.0.0')
commit('feat: first commit')
execCli('-x').stdout.should.equal('1.1.0\n')
})
})

describe('prerelease', function () {
it('creates a prerelease when executed with --pre-release and default tag', function () {
writePackageJson('1.0.0')
Expand Down

0 comments on commit c609595

Please sign in to comment.