Skip to content

Commit

Permalink
ci: Exclude archived BRM modules from module index data (Azure#1140)
Browse files Browse the repository at this point in the history
Updated the script for generating module index data to exclude archived
BRM modules.
  • Loading branch information
shenglol authored and hundredacres committed Mar 12, 2024
1 parent cadc7a6 commit b67b193
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/github-actions/generate-module-index-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ async function getModuleDescription(
*/
async function generateModuleIndexData({ require, github, context, core }) {
const fs = require("fs").promises;
const { existsSync } = require("fs");
const axios = require("axios").default;
const moduleIndexData = [];

Expand All @@ -91,6 +92,12 @@ async function generateModuleIndexData({ require, github, context, core }) {

for (const moduleName of moduleNames) {
const modulePath = `${moduleGroupPath}/${moduleName}`;
const archivedFilePath = `${modulePath}/ARCHIVED.md`;

if (existsSync(archivedFilePath)) {
continue;
}

const mainJsonPath = `${modulePath}/main.json`;
// BRM module git tags do not include the modules/ prefix.
const mcrModulePath = modulePath.slice(8);
Expand Down

0 comments on commit b67b193

Please sign in to comment.