Merge pull request #11 from jwigley/prefix

added support for prefix option to allow deploying to subdirectories
This commit is contained in:
Nicholas Terwoord
2017-03-29 08:06:03 -04:00
committed by GitHub

View File

@@ -31,7 +31,8 @@ module.exports = function(args) {
help += ' [aws_secret]: <aws_secret> # Optional, if provided as environment variable\n'; help += ' [aws_secret]: <aws_secret> # Optional, if provided as environment variable\n';
help += ' [concurrency]: <concurrency>\n'; help += ' [concurrency]: <concurrency>\n';
help += ' [region]: <region> # See https://github.com/LearnBoost/knox#region\n', help += ' [region]: <region> # See https://github.com/LearnBoost/knox#region\n',
help += ' [headers]: <JSON headers> # Optional, see README.md file\n\n'; help += ' [headers]: <JSON headers> # Optional, see README.md file\n';
help += ' [prefix]: <prefix> # Optional, prefix ending in /\n\n';
help += 'For more help, you can check the docs: ' + chalk.underline('https://github.com/nt3rp/hexo-deployer-s3'); help += 'For more help, you can check the docs: ' + chalk.underline('https://github.com/nt3rp/hexo-deployer-s3');
console.log(help); console.log(help);
@@ -42,7 +43,8 @@ module.exports = function(args) {
localDir: publicDir, localDir: publicDir,
deleteRemoved: true, deleteRemoved: true,
s3Params: xtend({ s3Params: xtend({
Bucket: args.bucket Bucket: args.bucket,
Prefix: args.prefix
},customHeaders) },customHeaders)
} }