Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
fix doc upload error, bump 2.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Aug 5, 2014
1 parent 7c116f0 commit 9267f53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ Yes, please do contribute. But before this, you should read our [Contributing Gu

## Changelog

**Nov 27th, 2013** `2.2.9`
**Aug 5th, 2014** `2.2.10`

- Fix upload doc error.

**Jul 28th, 2013** `2.2.9`

- Fix family error in node 0.11.*

**Nov 27th, 2013** `2.2.8`
**Jul 3rd, 2013** `2.2.8`

- Add server config for spm install

Expand Down
7 changes: 3 additions & 4 deletions lib/sdk/yuan.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var os = require('os');
var zlib = require('zlib');
var crypto = require('crypto');
var request = require('request');
var FormData = require('form-data');
var util = require('util');
var semver = require('semver');
var _ = require('lodash');
Expand Down Expand Up @@ -348,15 +347,15 @@ Yuan.prototype.upload = function(data, callback) {
auth: auth
};
var self = this;
var form = new FormData();
var r = this.request(query, callback);

var form = r.form();
form.append('name', data.name || '');
form.append('version', data.version || '');
form.append('tag', data.tag || 'latest');
form.append('file', fs.createReadStream(data.tarfile));
form.getLength(function(err, len) {
log.info('target', self.server);
var r = self.request(query, callback);
r._form = form;
r.setHeader('Content-Length', len);
});
};
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spm",
"version": "2.2.9",
"version": "2.2.10",
"preferGlobal": "true",
"description": "Static Package Manager",
"author": "Hsiaoming Yang <me@lepture.com>",
Expand All @@ -25,7 +25,6 @@
"semver": "~1.1.4",
"async": "~0.1.22",
"tar": "~0.1.16",
"form-data": "~0.1.0",
"request": "~2.39.0",
"colorful": "~2.1.0",
"commander": "~1.1.1",
Expand Down

0 comments on commit 9267f53

Please sign in to comment.