Skip to content

Commit

Permalink
add path resolution using manifest for staging bucket. Closes #618
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshadfield committed Aug 9, 2018
1 parent 723fd53 commit cbf499c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rules:
no-unneeded-ternary: ["error", { "defaultAssignment": true }]
quote-props: ["error", "as-needed"]
prefer-const: ["error", {"destructuring": "all"}]
indent: ["error", 2, {"MemberExpression": "off"}]
indent: ["error", 2, {"MemberExpression": "off", "SwitchCase": 1}]
parserOptions:
ecmaVersion: 6
sourceType: module
Expand Down
17 changes: 14 additions & 3 deletions src/server/manifestHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,20 @@ const buildManifest = (dest) => {
};

const checkFieldsAgainstManifest = (fields, source) => {
const manifest = source === "local" ? global.LOCAL_MANIFEST :
source === "live" ? global.LIVE_MANIFEST :
undefined;
let manifest;
switch (source) {
case "live":
manifest = global.LIVE_MANIFEST;
break;
case "staging":
manifest = global.STAGING_MANIFEST;
break;
case "local":
manifest = global.LOCAL_MANIFEST;
break;
default:
break;
}

if (!manifest) {
return fields;
Expand Down

0 comments on commit cbf499c

Please sign in to comment.