Skip to content

Commit d17a9d8

Browse files
authored
Merge pull request #1139 from nbogie/nb-main-parameterise-cloning-contrib-docs
build:contributor-docs now consults env vars for content repo & branch
2 parents df24b0f + 1101241 commit d17a9d8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/scripts/builders/contribute.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ const buildContributorDocs = async () => {
264264
latestRelease = `v${ latestRelease}`;
265265
}
266266

267-
await cloneLibraryRepo(clonedRepoPath, docsRepoUrl, latestRelease);
267+
await cloneLibraryRepo(
268+
clonedRepoPath,
269+
process.env.P5_REPO_URL || docsRepoUrl,
270+
process.env.P5_BRANCH || latestRelease,
271+
);
268272

269273
// Clean out previous files
270274
console.log("Cleaning out current content collection...");

src/scripts/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const cloneLibraryRepo = async (
3535
shouldFixAbsolutePathInPreprocessor?: boolean
3636
} = {}
3737
) => {
38+
console.log(`Considering cloning repo: ${repoUrl} branch: ${branch} into path: ${localSavePath}`);
3839
const git = simpleGit();
3940

4041
const repoExists = await fileExistsAt(localSavePath);

0 commit comments

Comments
 (0)