Skip to content

Commit

Permalink
feat(deployment): Amazon S3 China region support
Browse files Browse the repository at this point in the history
Close #1799 #1816
  • Loading branch information
chenhbc authored and develar committed Jul 11, 2017
1 parent 7da827e commit 33bb25c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions packages/electron-builder-http/src/publishOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ export interface S3Options extends PublishConfiguration {
export function s3Url(options: S3Options) {
let url: string
if (!options.bucket.includes(".")) {
url = `https://${options.bucket}.s3.amazonaws.com`
if (options.region === "cn-north-1") {
url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`
}
else {
url = `https://${options.bucket}.s3.amazonaws.com`
}
}
else {
if (!options.region) {
Expand Down Expand Up @@ -177,4 +182,4 @@ export interface BintrayOptions extends PublishConfiguration {
readonly user?: string | null

readonly token?: string | null
}
}
7 changes: 4 additions & 3 deletions test/src/helpers/checkDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ async function check(projectDir: string, devPackageData: any): Promise<boolean>
delete (result.missing as any).toml
}

const squirrel = (result.missing as any)["electron-builder-squirrel-windows"]
if (squirrel != null && squirrel.length === 1 && squirrel[0].endsWith("winPackager.js")) {
delete (result.missing as any)["electron-builder-squirrel-windows"]
for (const name of Object.keys(result.missing)) {
if (name === "electron-builder-squirrel-windows" || name === "electron-webpack") {
delete (result.missing as any)[name]
}
}

if (Object.keys(result.missing).length > 0) {
Expand Down

0 comments on commit 33bb25c

Please sign in to comment.