Skip to content

Commit

Permalink
chore: env mgmt fixed while running service
Browse files Browse the repository at this point in the history
  • Loading branch information
faizahmedfarooqui committed Jul 24, 2023
1 parent fc3586f commit eb849ae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions packages/bolt/build/actions/service-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
console.log(chalk_1.default.yellow(`>> Given "${srOption}" service runner is not supported for ${serviceName}, using "${content.supported_service_runners[0]}" instead!`));
srOption = content.supported_service_runners[0];
}
const { envfile: localENV } = content.service_runners["local"];
const { envfile: dockerENV } = content.service_runners["docker"];
const localENVPath = (0, path_1.join)(servicePath, localENV);
const dockerENVPath = (0, path_1.join)(servicePath, dockerENV);
// generates .env
yield common_1.default.generateEnv();
// Make data interpolate into service-runner's yaml content from given env file :: LOCAL
if ((_a = content === null || content === void 0 ? void 0 : content.service_runners) === null || _a === void 0 ? void 0 : _a.local) {
const { envfile } = content.service_runners["local"];
const localENVPath = (0, path_1.join)(servicePath, envfile);
content.service_runners.local = yield (0, data_interpolate_1.default)(content.service_runners.local, localENVPath);
}
// Make data interpolate into service-runner's yaml content from given env file :: DOCKER
if ((_b = content === null || content === void 0 ? void 0 : content.service_runners) === null || _b === void 0 ? void 0 : _b.docker) {
const { envfile } = content.service_runners["docker"];
const dockerENVPath = (0, path_1.join)(servicePath, envfile);
content.service_runners.docker = yield (0, data_interpolate_1.default)(content.service_runners.docker, dockerENVPath);
}
let isConfigValid = false;
Expand Down
Empty file modified packages/bolt/build/index.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion packages/bolt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack/bolt",
"version": "0.1.14",
"version": "0.1.15",
"description": "Bolt Framework CLI",
"main": "build/index.js",
"bin": {
Expand Down
12 changes: 6 additions & 6 deletions packages/bolt/src/actions/service-up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ export default class ServiceUp {
srOption = content.supported_service_runners[0];
}

const { envfile: localENV } = content.service_runners["local"];
const { envfile: dockerENV } = content.service_runners["docker"];

const localENVPath = join(servicePath, localENV);
const dockerENVPath = join(servicePath, dockerENV);

// generates .env
await Common.generateEnv();

// Make data interpolate into service-runner's yaml content from given env file :: LOCAL
if (content?.service_runners?.local) {
const { envfile } = content.service_runners["local"];
const localENVPath = join(servicePath, envfile);

content.service_runners.local = await interpolate(
content.service_runners.local, localENVPath
);
}

// Make data interpolate into service-runner's yaml content from given env file :: DOCKER
if (content?.service_runners?.docker) {
const { envfile } = content.service_runners["docker"];
const dockerENVPath = join(servicePath, envfile);

content.service_runners.docker = await interpolate(
content.service_runners.docker, dockerENVPath
);
Expand Down

0 comments on commit eb849ae

Please sign in to comment.