fix: get showUpcomingChange from env.json (#42440)
This commit is contained in:
committed by
GitHub
parent
af2a7658b4
commit
c6aa6ddbcd
@ -18,6 +18,8 @@ const { helpCategoryMap } = require('../client/utils/challengeTypes');
|
|||||||
const { curriculum: curriculumLangs } =
|
const { curriculum: curriculumLangs } =
|
||||||
require('../config/i18n/all-langs').availableLangs;
|
require('../config/i18n/all-langs').availableLangs;
|
||||||
|
|
||||||
|
const { showUpcomingChanges } = require('../config/env.json');
|
||||||
|
|
||||||
const access = util.promisify(fs.access);
|
const access = util.promisify(fs.access);
|
||||||
|
|
||||||
const challengesDir = path.resolve(__dirname, './challenges');
|
const challengesDir = path.resolve(__dirname, './challenges');
|
||||||
@ -183,7 +185,7 @@ async function buildBlocks({ basename: blockName }, curriculum, superBlock) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isUpcomingChange || process.env.SHOW_UPCOMING_CHANGES === 'true') {
|
if (!isUpcomingChange || showUpcomingChanges) {
|
||||||
// add the block to the superBlock
|
// add the block to the superBlock
|
||||||
const blockInfo = { meta: blockMeta, challenges: [] };
|
const blockInfo = { meta: blockMeta, challenges: [] };
|
||||||
curriculum[superBlock].blocks[blockName] = blockInfo;
|
curriculum[superBlock].blocks[blockName] = blockInfo;
|
||||||
|
Reference in New Issue
Block a user