sourcemint / sm-npm

25 stars 4 forks source link

`sm bump` still has submit issues #13

Closed gjtorikian closed 12 years ago

gjtorikian commented 12 years ago

Command:

sm bump -p

on sm 0.2.4.

Result:


[gjtorikian@Garen-C9 cloud9ide-documentation]$ sm bump -p
  * ERROR ***************************************************************************
  * Error: Error committing: [master 6119049] bump package version to v0.1.2
 1 file changed, 1 insertion(+), 1 deletion(-)

  * File : false @ false
  * Stack:
  *    Error: Error committing: [master 6119049] bump package version to v0.1.2
  *     1 file changed, 1 insertion(+), 1 deletion(-)
  *    
  *        at /usr/local/lib/node_modules/sm/node_modules/sourcemint-pm-sm/node_modules/sourcemint-pm-git/lib/git.js:366:27
  *        at _fulfilled (/usr/local/lib/node_modules/sm/node_modules/sourcemint-util-js/node_modules/q/q.js:860:32)
  *        at /usr/local/lib/node_modules/sm/node_modules/sourcemint-util-js/node_modules/q/q.js:881:34
  *        at makePromise.promiseSend (/usr/local/lib/node_modules/sm/node_modules/sourcemint-util-js/node_modules/q/q.js:553:9)
  *        at /usr/local/lib/node_modules/sm/node_modules/sourcemint-util-js/node_modules/q/q.js:880:28
  *        at makePromise.promiseSend (/usr/local/lib/node_modules/sm/node_modules/sourcemint-util-js/node_modules/q/q.js:553:9)
  *        at Array.<anonymous> (/usr/local/lib/node_modules/sm/node_modules/sourcemint-util-js/node_modules/q/q.js:465:35)
  *        at EventEmitter._tickCallback (node.js:190:38)
  * ERROR ***************************************************************************

Expected: it does the push to the repo.

I'd seen this before with just sm bump and older sm versions.

cadorn commented 12 years ago

Hmm. Strange. If it happens consistently or you can find a pattern let me know.

I have not run into it.

gjtorikian commented 12 years ago

It happens every time I try to use it. Used to happen all the time with C9Local, too.

How do I change the sm verbosity so that I can presumably see more logs?

cadorn commented 12 years ago

I'll have to add a setting for more verbose logs.

Can you zip the whole folder and email it to me please.

As a workaround you can manually tag the library at the next version (make sure version in package.json matches):

git tag v0.1.X

cadorn commented 12 years ago

Just thought of something that may help: Make sure you have pulled the latest tage first:

git fetch origin

gjtorikian commented 12 years ago

git fetch origin did not help.

On my local machine, I added a forced options.verbose = true. Here's the new output:


Running: git status (cwd: /Users/gjtorikian/Developer/cloud9ide-documentation)
# On branch master
nothing to commit (working directory clean)
Running: git rev-parse HEAD (cwd: /Users/gjtorikian/Developer/cloud9ide-documentation)
9671598aa30823466db1c145eae1b4e247f57d44
Running: git log --oneline origin/master..HEAD (cwd: /Users/gjtorikian/Developer/cloud9ide-documentation)
Running: git log --oneline --decorate -n 1 (cwd: /Users/gjtorikian/Developer/cloud9ide-documentation)
9671598 (HEAD, origin/master, master) bump package version to v0.1.3
Running: git add . (cwd: /Users/gjtorikian/Developer/cloud9ide-documentation)
Running: git commit -m bump package version to v0.1.4 (cwd: /Users/gjtorikian/Developer/cloud9ide-documentation)
[master c20743d] bump package version to v0.1.4
 1 file changed, 1 insertion(+), 1 deletion(-)
  * ERROR ***************************************************************************
  * Error: Error committing: [master c20743d] bump package version to v0.1.4
 1 file changed, 1 insertion(+), 1 deletion(-)

The error is emitted on this line:

        return Q.when(done, function() {
            return self.callGit([
                "commit",
                "-m", message
            ]).then(function(result) {
                if (!/\d* files changed,/.test(result)) {
                    throw new Error("Error committing: " + result);
                }
            });
        });

Not sure how it's supposed to find the "files changed" message, but that's where the error is.

cadorn commented 12 years ago

Should be fixed in: sm@0.2.5

gjtorikian commented 12 years ago

Confirmed that it's working. Thanks!