Merge pull request #15 from starcatmeow/master
Add support of customizing endpoint for S3-compatiable services
This commit is contained in:
@@ -25,6 +25,7 @@ deploy:
|
||||
headers: <headers in JSON format> // pass any headers to S3, usefull for metadata cache setting of Hexo assets
|
||||
prefix: <prefix> // Optional, prefix ending in /
|
||||
delete_removed: <true|false> // if true will delete removed files from S3. Default: true
|
||||
endpoint: <endpoint> // Optional, for S3 compatiable services
|
||||
```
|
||||
|
||||
If you installed the AWS command-line tool and provided your credentials via `aws configure`,
|
||||
|
||||
@@ -15,6 +15,9 @@ module.exports = function(args) {
|
||||
region: args.region
|
||||
}
|
||||
};
|
||||
if (args.endpoint) {
|
||||
config.endpoint = args.endpoint;
|
||||
}
|
||||
if (!config.s3Options.accessKeyId && !config.s3Options.secretAccessKey && args.aws_cli_profile) {
|
||||
/* User configured their access and secret keys in ~/.aws/credentials, check there */
|
||||
var iniFile = path.join(process.env.HOME, '.aws');
|
||||
@@ -52,6 +55,7 @@ module.exports = function(args) {
|
||||
help += ' [headers]: <JSON headers> # Optional, see README.md file\n';
|
||||
help += ' [prefix]: <prefix> # Optional, prefix ending in /\n';
|
||||
help += ' [delete_removed]: <delete> # Optional, if true will delete removed files from S3 /\n\n';
|
||||
help += ' [endpoint]: <endpoint> # Optional, for S3 compatiable services\n'
|
||||
help += 'For more help, you can check the docs: ' + chalk.underline('https://github.com/nt3rp/hexo-deployer-s3');
|
||||
|
||||
console.log(help);
|
||||
|
||||
Reference in New Issue
Block a user