fargate-helper
Advanced tools
Comparing version 0.4.8 to 0.4.9-0
@@ -32,11 +32,9 @@ const AWS = require("aws-sdk"); | ||
const fileString = fs.readFileSync(value, "UTF-8"); | ||
console.log(`ENV-FILE:\n${fileString}`) | ||
const lines = fileString.split("\n"); | ||
for (const line of lines) { | ||
if (line.trim().indexOf("=") === -1) { | ||
continue; | ||
} | ||
const keyValue = line.trim().split(/=(.+)/); | ||
const envKey = keyValue[0]; | ||
options.env[envKey] = keyValue[1]; | ||
} | ||
FargateHelper._linesToOptions(lines) | ||
} else if (key == "envContents") { | ||
// Read in an env file | ||
const lines = value.split(" "); | ||
FargateHelper._linesToOptions(lines) | ||
} else { | ||
@@ -228,4 +226,15 @@ options[key] = value; | ||
} | ||
static _linesToOptions(options, lines) { | ||
for (const line of lines) { | ||
if (line.trim().indexOf("=") === -1) { | ||
continue; | ||
} | ||
const keyValue = line.trim().split(/=(.+)/); | ||
const envKey = keyValue[0]; | ||
options.env[envKey] = keyValue[1]; | ||
} | ||
} | ||
} | ||
module.exports = FargateHelper; |
{ | ||
"name": "fargate-helper", | ||
"version": "0.4.8", | ||
"version": "0.4.9-0", | ||
"description": "Helper scripts for deploying to Fargate", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
39156
723