From 8a0ffcfb14c4c7fbb33eeeda177cc7f9773a8794 Mon Sep 17 00:00:00 2001
From: Winnie Hellmann <winnie@gitlab.com>
Date: Fri, 5 Apr 2019 12:08:05 +0200
Subject: [PATCH] Rename environment variable EE to IS_GITLAB_EE

(cherry picked from commit 64e9cf00a7d889913ae7327695394cac29643f0b)
---
 config/helpers/is_ee_env.js     | 4 ++--
 config/webpack.config.js        | 2 +-
 spec/javascripts/test_bundle.js | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config/helpers/is_ee_env.js b/config/helpers/is_ee_env.js
index 1fdbca591c05e..3fe9bb891eb1c 100644
--- a/config/helpers/is_ee_env.js
+++ b/config/helpers/is_ee_env.js
@@ -4,6 +4,6 @@ const path = require('path');
 const ROOT_PATH = path.resolve(__dirname, '../..');
 
 module.exports =
-  process.env.EE !== undefined
-    ? JSON.parse(process.env.EE)
+  process.env.IS_GITLAB_EE !== undefined
+    ? JSON.parse(process.env.IS_GITLAB_EE)
     : fs.existsSync(path.join(ROOT_PATH, 'ee'));
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 9a37856a99e47..19b488453057f 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -322,7 +322,7 @@ module.exports = {
       }),
 
     new webpack.DefinePlugin({
-      'process.env.EE': JSON.stringify(IS_EE),
+      'process.env.IS_GITLAB_EE': JSON.stringify(IS_EE),
     }),
   ].filter(Boolean),
 
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 235a17d13b06a..87ef0885d8c20 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -69,7 +69,7 @@ window.gl = window.gl || {};
 window.gl.TEST_HOST = TEST_HOST;
 window.gon = window.gon || {};
 window.gon.test_env = true;
-window.gon.ee = process.env.EE;
+window.gon.ee = process.env.IS_GITLAB_EE;
 gon.relative_url_root = '';
 
 let hasUnhandledPromiseRejections = false;
@@ -124,7 +124,7 @@ const axiosDefaultAdapter = getDefaultAdapter();
 // render all of our tests
 const testContexts = [require.context('spec', true, /_spec$/)];
 
-if (process.env.EE) {
+if (process.env.IS_GITLAB_EE) {
   testContexts.push(require.context('ee_spec', true, /_spec$/));
 }
 
@@ -213,7 +213,7 @@ if (process.env.BABEL_ENV === 'coverage') {
   describe('Uncovered files', function() {
     const sourceFilesContexts = [require.context('~', true, /\.(js|vue)$/)];
 
-    if (process.env.EE) {
+    if (process.env.IS_GITLAB_EE) {
       sourceFilesContexts.push(require.context('ee', true, /\.(js|vue)$/));
     }
 
-- 
GitLab