From 5965304a5f98375fed7284bc71d7f80ee2f77956 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 1 Dec 2016 20:09:14 -0800 Subject: [PATCH 1/2] use default amazon env variables --- lib/deployer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/deployer.js b/lib/deployer.js index f66ea77..a4f48c7 100644 --- a/lib/deployer.js +++ b/lib/deployer.js @@ -6,8 +6,8 @@ module.exports = function(args) { var config = { maxAsyncS3: args.concurrency, s3Options: { - accessKeyId: args.aws_key || process.env.AWS_KEY, - secretAccessKey: args.aws_secret || process.env.AWS_SECRET, + accessKeyId: args.aws_key || process.env.AWS_ACCESS_KEY_ID || process.env.AWS_KEY, + secretAccessKey: args.aws_secret || process.env.AWS_SECRET_ACCESS_KEY || process.env.AWS_SECRET, region: args.region } }; @@ -44,7 +44,7 @@ module.exports = function(args) { var uploader = client.uploadDir(params); log.info('Uploading...'); - + return uploader .on('progress', function() { // log.info(uploader.progressAmount + ' / ' + uploader.progressTotal); @@ -53,4 +53,4 @@ module.exports = function(args) { }).on('error', function(err) { log.error(err) }); -}; \ No newline at end of file +}; From 240934160539011fc3a00d60a4457591d9cdb1e5 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 1 Dec 2016 20:23:56 -0800 Subject: [PATCH 2/2] readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index acc9db1..8181575 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# hexo-deployer-s3 +# hexo-deployer-s3 Amazon S3 deployer plugin for [Hexo](http://hexo.io/) @@ -17,8 +17,8 @@ You can configure this plugin in `_config.yml`. deploy: type: s3 bucket: - aws_key: // Optional, if the environment variable `AWS_KEY` is set - aws_secret: // Optional, if the environment variable `AWS_SECRET` is set + aws_key: // Optional, if the environment variable `AWS_ACCESS_KEY_ID` is set + aws_secret: // Optional, if the environment variable `AWS_SECRET_ACCESS_KEY` is set concurrency: // Optional region: // Optional, see https://github.com/LearnBoost/knox#region ```