Skip to content

Commit

Permalink
Changed: use grizzly v2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Jun 28, 2016
1 parent eede152 commit 355b637
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

- Changed: use ``grizzly`` v2.x
(ref [node-grizzly#1](https://github.com/coderaiser/node-grizzly/issues/1))

# 1.1.4 - 2016-06-07

- Fixed: ``TypeError: Cannot read property 'createRelease' of undefined``
Expand Down
12 changes: 6 additions & 6 deletions github-release-from-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*
* we will use `grizzly` (https://github.com/coderaiser/node-grizzly)
* so we need
* - owner (user from package.json repo field)
* - repo (same as)owner
* - user (user from package.json repo field)
* - repo (same as)user
* - tag (version)
* - release name (tag)
* - description (changelog section corresponding to tag)
Expand Down Expand Up @@ -46,7 +46,7 @@ try {
}
catch(e) {throw "No " + changelogFileName + " found in " + process.cwd()}

// parse repository url to get owner & repo slug
// parse repository url to get user & repo slug
var repoUrl
repoUrl = pkg.repository
if (repoUrl === undefined) {
Expand All @@ -60,7 +60,7 @@ if (matches === null) {
throw "Unable to parse repository url"
}
var repoData = matches[1].split("/")
var owner = repoData[0]
var user = repoData[0]
var repo = repoData[1].replace(/\.git$/, "")

// version
Expand Down Expand Up @@ -98,7 +98,7 @@ body = body.join("\n")

// prepare release data
var releaseOptions = {
owner: owner,
user: user,
repo: repo,
tag_name: tagName,
name: tagName,
Expand All @@ -111,5 +111,5 @@ release(token, releaseOptions, function(err) {
if (err) {
throw err
}
console.log(owner + " / " + repo + " " + tagName + " released")
console.log(user + "/" + repo + " " + tagName + " released")
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"github-release-from-changelog": "github-release-from-changelog.js"
},
"dependencies": {
"grizzly": "1.0.16",
"grizzly": "^2.0.0",
"minimist": "^1.2.0"
},
"devDependencies": {
Expand Down

0 comments on commit 355b637

Please sign in to comment.