Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Rename bucket => euBucket
Browse files Browse the repository at this point in the history
 🐿 v2.5.16
  • Loading branch information
adgad committed Nov 21, 2017
1 parent 6f1308a commit ca8e3a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/deploy-hashed-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const Metrics = require('next-metrics').Metrics;
const AWS_ACCESS_HASHED_ASSETS = process.env.AWS_ACCESS_HASHED_ASSETS || process.env.aws_access_hashed_assets;
const AWS_SECRET_HASHED_ASSETS = process.env.AWS_SECRET_HASHED_ASSETS || process.env.aws_secret_hashed_assets;

const bucket = 'ft-next-hashed-assets-prod';
const euBucket = 'ft-next-hashed-assets-prod';
const usBucket = 'ft-next-hashed-assets-prod-us';
const region = 'eu-west-1';
const euRegion = 'eu-west-1';
const usRegion = 'us-east-1';
const gzip = denodeify(require('zlib').gzip);

Expand All @@ -24,7 +24,7 @@ function task (opts) {
aws.config.update({
accessKeyId: AWS_ACCESS_HASHED_ASSETS,
secretAccessKey: AWS_SECRET_HASHED_ASSETS,
region
euRegion
});

function upload (bucket, params) {
Expand Down Expand Up @@ -106,11 +106,11 @@ function task (opts) {
break;
}
return Promise.all([
upload(bucket, params),
upload(euBucket, params),
upload(usBucket, params)
])
.then(() => Promise.all([
waitForOk(`http://${bucket}.s3-website-${region}.amazonaws.com/${key}`),
waitForOk(`http://${euBucket}.s3-website-${euRegion}.amazonaws.com/${key}`),
waitForOk(`http://${usBucket}.s3-website-${usRegion}.amazonaws.com/${key}`),
isMonitoringAsset ? gzip(content) : Promise.resolve()
]))
Expand Down

0 comments on commit ca8e3a0

Please sign in to comment.