Add support of customizing endpoint for S3-compatiable services

This commit is contained in:
李董睿煊
2022-08-31 22:54:37 +08:00
committed by GitHub
parent 69164b66e2
commit d1eb441498
2 changed files with 5 additions and 0 deletions

View File

@@ -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);