Skip to content

Commit

Permalink
feat: Allow to use ~/.aws/credentials file as alternative to env vari…
Browse files Browse the repository at this point in the history
…ables

Close #1320
  • Loading branch information
develar committed Mar 24, 2017
1 parent 08893e3 commit 2e59959
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-publisher-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 1 addition & 8 deletions packages/electron-publisher-s3/src/s3Publisher.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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) {
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 2e59959

Please sign in to comment.