From 2e599598900763631ae8685b5548cc1d97a12d7e Mon Sep 17 00:00:00 2001 From: develar Date: Fri, 24 Mar 2017 09:13:02 +0100 Subject: [PATCH] feat: Allow to use ~/.aws/credentials file as alternative to env variables Close #1320 --- package.json | 2 +- packages/electron-publisher-s3/package.json | 2 +- .../electron-publisher-s3/src/s3Publisher.ts | 9 +-------- yarn.lock | 18 +++++++++--------- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 23127273e83..9f9524180b3 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "ajv": "^5.0.4-beta.0", "ajv-keywords": "^2.0.1-beta.2", "archiver": "^1.3.0", - "aws-sdk": "^2.31.0", + "aws-sdk": "^2.32.0", "bluebird-lst": "^1.0.2", "chalk": "^1.1.3", "chromium-pickle-js": "^0.2.0", diff --git a/packages/electron-publisher-s3/package.json b/packages/electron-publisher-s3/package.json index ec0b8546a94..eec8ef0e7ec 100644 --- a/packages/electron-publisher-s3/package.json +++ b/packages/electron-publisher-s3/package.json @@ -12,7 +12,7 @@ ], "dependencies": { "fs-extra-p": "^4.1.0", - "aws-sdk": "^2.31.0", + "aws-sdk": "^2.32.0", "mime": "^1.3.4", "electron-publish": "~0.0.0-semantic-release", "electron-builder-util": "~0.0.0-semantic-release" diff --git a/packages/electron-publisher-s3/src/s3Publisher.ts b/packages/electron-publisher-s3/src/s3Publisher.ts index f84c0ab7c93..7df41d9f7a1 100644 --- a/packages/electron-publisher-s3/src/s3Publisher.ts +++ b/packages/electron-publisher-s3/src/s3Publisher.ts @@ -1,6 +1,6 @@ import { S3 } from "aws-sdk" import { S3Options } from "electron-builder-http/out/publishOptions" -import { debug, isEmptyOrSpaces } from "electron-builder-util" +import { debug } from "electron-builder-util" import { PublishContext, Publisher } from "electron-publish" import { stat } from "fs-extra-p" import mime from "mime" @@ -15,13 +15,6 @@ export default class S3Publisher extends Publisher { super(context) debug(`Creating S3 Publisher — bucket: ${info.bucket}`) - - if (isEmptyOrSpaces(process.env.AWS_ACCESS_KEY_ID)) { - throw new Error(`Env AWS_ACCESS_KEY_ID is not set`) - } - if (isEmptyOrSpaces(process.env.AWS_SECRET_ACCESS_KEY)) { - throw new Error(`Env AWS_SECRET_ACCESS_KEY is not set`) - } } static async checkAndResolveOptions(options: S3Options) { diff --git a/yarn.lock b/yarn.lock index 5c9aab1a8a5..cc9f018ab2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -271,9 +271,9 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -aws-sdk@^2.31.0: - version "2.31.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.31.0.tgz#e17480610ebddad57732918a4849f9e5f4ade44d" +aws-sdk@^2.32.0: + version "2.32.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.32.0.tgz#9fe278b2ec1b12fddd1afeb74439581cdc2e5990" dependencies: buffer "4.9.1" crypto-browserify "1.0.9" @@ -2235,15 +2235,15 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -mime-db@~1.26.0: - version "1.26.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.14" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" dependencies: - mime-db "~1.26.0" + mime-db "~1.27.0" mime@^1.3.4: version "1.3.4"