From 14b8952cfd9de86def153b1ff95535dff6dd5a4b Mon Sep 17 00:00:00 2001 From: Sergey Zvyagintsev Date: Thu, 10 Feb 2022 12:31:53 +0700 Subject: [PATCH] Add "project_name" environment configuration option --- jake.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jake.js b/jake.js index 5e74871..a5fccb5 100644 --- a/jake.js +++ b/jake.js @@ -33,9 +33,15 @@ try { var envConfig = config.environtments[env]; var envReplace = require('./env-replace'); - var projectName = systemEnv.JAKE_PROJECT_NAME || (config.project_name ? envReplace(config.project_name) : null); + var projectName = systemEnv.JAKE_PROJECT_NAME || null; var aliases = config.aliases || {}; + if (envConfig.project_name) { + projectName = envReplace(envConfig.project_name); + } else if (config.project_name) { + projectName = envReplace(config.project_name); + } + if (projectName !== systemEnv.JAKE_PROJECT_NAME) { systemEnv.JAKE_PROJECT_NAME = projectName; }