Skip to content

Commit

Permalink
fix(post): revert to execing git commands
Browse files Browse the repository at this point in the history
`git-node` is nice in theory, but actually unstable and inconsistent.
  • Loading branch information
boennemann committed Feb 8, 2015
1 parent 486ebed commit bf69c1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "semantic-release",
"description": "automated semver compliant package publishing",
"version": "0.0.0-note.that.this.is.not.the.actual.version",
"version": "0.0.0-semantically-released",
"author": "Stephan Bönnemann <stephan@boennemann.me>",
"bin": "./bin/semantic-release.js",
"bugs": {
Expand All @@ -11,7 +11,6 @@
"abbrev": "^1.0.5",
"conventional-changelog": "0.0.11",
"error-first-handler": "^1.0.1",
"git-node": "^0.1.1",
"github": "^0.2.3",
"github-url-from-git": "^1.4.0",
"ini": "^1.3.2",
Expand Down
4 changes: 2 additions & 2 deletions src/post.js
@@ -1,10 +1,10 @@
'use strict'

var exec = require('child_process').exec
var readFile = require('fs').readFileSync
var url = require('url')

var changelog = require('conventional-changelog')
var git = require('git-node')
var GitHubApi = require('github')
var parseSlug = require('parse-github-repo-url')
var parseUrl = require('github-url-from-git')
Expand All @@ -31,7 +31,7 @@ module.exports = function (options, cb) {
repository: parseUrl(repository),
file: false
}, efh(cb)(function (log) {
git.repo('./.git').loadAs('commit', 'HEAD', efh(cb)(function (commit, hash) {
exec('git rev-parse HEAD', efh(cb)(function (hash) {
var ghRepo = parseSlug(repository)
var release = {
owner: ghRepo[0],
Expand Down

1 comment on commit bf69c1a

@christophwitzko
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git-node does not work with a detached HEAD. fixed in #6

Please sign in to comment.