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

Commit

Permalink
Merge pull request #53 from Financial-Times/uppercase-aws
Browse files Browse the repository at this point in the history
Support uppercase AWS tokens - fixes #50
  • Loading branch information
matthew-andrews committed Apr 9, 2015
2 parents 2722087 + 483d057 commit d3a9c23
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tasks/deploy-hashed-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ var crypto = require('crypto');
var basename = require('path').basename;
var aws = require('aws-sdk');

var AWS_ACCESS_HASHED_ASSETS = process.env.AWS_ACCESS_HASHED_ASSETS || process.env.aws_access_hashed_assets;
var AWS_SECRET_HASHED_ASSETS = process.env.AWS_SECRET_HASHED_ASSETS || process.env.aws_secret_hashed_assets;

aws.config.update({
accessKeyId: process.env.aws_access_hashed_assets,
secretAccessKey: process.env.aws_secret_hashed_assets,
accessKeyId: AWS_ACCESS_HASHED_ASSETS,
secretAccessKey: AWS_SECRET_HASHED_ASSETS,
region: 'eu-west-1'
});

Expand Down Expand Up @@ -57,7 +60,7 @@ function hashAndUpload(opts) {
}

module.exports = function(app) {
if(!(process.env.aws_access_hashed_assets && process.env.aws_secret_hashed_assets)) {
if(!(AWS_ACCESS_HASHED_ASSETS && AWS_SECRET_HASHED_ASSETS)) {
return Promise.reject("Must set aws_access_hashed_assets and aws_secret_hashed_assets");
}

Expand Down

0 comments on commit d3a9c23

Please sign in to comment.