Skip to content

Commit

Permalink
修改描述
Browse files Browse the repository at this point in the history
  • Loading branch information
RuanXinyu committed Sep 25, 2018
1 parent f5d11a4 commit 4c3aa32
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ You can configure this plugin in `_config.yml`.
# You can use this:
deploy:
type: huaweicloud-obs
server : <https://yourdomainname>
bucket: <yourBucketName>
access_key_id: <access key>
secret_access_key: <secret access key>
server : <https://yourdomainname>(e.g. https://obs.cn-north-1.myhwclouds.com)
bucket: <your bucket name>(e.g. obs-2f97)
access_key_id: <access key>(e.g. R7DYQD3DQRRLTDWYtE3S)
secret_access_key: <secret access key>(e.g. TERHf0NGpDrbhsbc1h3xymB9w22wK8lLgOFkgjCB2)
```
## Known Issues
Expand Down
16 changes: 8 additions & 8 deletions deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ module.exports = function (args, callback) {
log = this.log,
uploadFileList = [];

if (!args.server || !bucket || !args.access_key_id || !args.secret_access_key) {
if (!args.server || !args.bucket || !args.access_key_id || !args.secret_access_key) {
var help = [
'You should argsure deployment settings in _config.yml first!',
'',
'Example:',
' deploy:',
' type: huaweicloud-obs',
' server : <https://yourdomainname>',
' bucket: <yourBucketName>',
' access_key_id: <access key>',
' secret_access_key: <secret access key>',
' server : <https://yourdomainname>(e.g. https://obs.cn-north-1.myhwclouds.com)',
' bucket: <your bucket name>(e.g. obs-2f97)',
' access_key_id: <access key>(e.g. R7DYQD3DQRRLTDWYtE3S)',
' secret_access_key: <secret access key>(e.g. TERHf0NGpDrbhsbc1h3xymB9w22wK8lLgOFkgjCB2)',
'',
'For more help, you can check the docs: ' + chalk.underline('http://hexo.io/docs/deployment.html') + ' and ' + chalk.underline('https://support.huaweicloud.com/bestpractice-obs/obs_05_0620.html')
];
Expand All @@ -37,7 +37,7 @@ module.exports = function (args, callback) {
});


log.info('Uploading files to huaweicloud obs...');
console.log('Uploading files to huaweicloud obs...');

// get all files sync
traverseFiles(publicDir, function (file) {
Expand All @@ -55,9 +55,9 @@ module.exports = function (args, callback) {
SourceFile : item.file
}, (err, result) => {
if(err){
console.error('Error-->' + err);
console.error(item.file + ' --> ' + item.uploadPath + ' : Error: ' + err);
}else{
console.log('Status-->' + result.CommonMsg.Status);
console.log(item.file + ' --> ' + item.uploadPath + ' : Status: ' + result.CommonMsg.Status);
}
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-deployer-huaweicloud-obs",
"version": "0.4.0",
"version": "0.1.0",
"description": "huaweicloud obs deployer plugin of Hexo.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4c3aa32

Please sign in to comment.