Skip to content

Commit

Permalink
simplify dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
ungoldman committed Mar 10, 2015
1 parent 14de47d commit 79fc53b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com).

## [Unreleased]
## [1.1.2] - 2015-03-09
* add `dry-run` and `workpath` options
* add a `get-defaults.js` test
* improve change log
* check if commit exists on github before trying to create release [#11](https://github.com/ngoldman/gh-release/issues/11)
* add support for git URLs [#16](https://github.com/ngoldman/gh-release/issues/16)

## [1.1.1] - 2015-03-02
* use `changelog-parser` for more reliable change log parsing
Expand Down Expand Up @@ -56,7 +57,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
* define basic node interface
* define basic cli interface

[Unreleased]: https://github.com/ngoldman/gh-release/compare/v1.1.1...HEAD
[1.1.2]: https://github.com/ngoldman/gh-release/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/ngoldman/gh-release/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/ngoldman/gh-release/compare/v1.0.8...v1.1.0
[1.0.8]: https://github.com/ngoldman/gh-release/compare/v1.0.7...v1.0.8
Expand Down
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ var questions = [
]

function ghRelease (options, auth, callback) {
// save dry run value then remove from options
var dryRun = options.dryRun
delete options.dryRun

if (auth && auth.token) {
client.authenticate({
type: 'oauth',
Expand All @@ -48,7 +44,7 @@ function ghRelease (options, auth, callback) {

console.log(releaseOptions)

if (dryRun) process.exit(0)
if (options.dryRun) process.exit(0)

inquirer.prompt(questions, function (answers) {
if (!answers.confirm) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gh-release",
"description": "Create a release for a node package on github.",
"version": "1.1.1",
"version": "1.1.2",
"author": "Nate Goldman <[email protected]>",
"bin": {
"gh-release": "./bin/cli.js"
Expand Down

0 comments on commit 79fc53b

Please sign in to comment.