Skip to content

Commit 533d304

Browse files
fix: update cloneRepo function to accept branch name parameter
1 parent 946cf66 commit 533d304

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

scripts/release/build-mpk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ async function updateNativeComponentsTestProject(
181181
log(`Updating NativeComponentsTestProject (repo=${moduleInfo.testProjectUrl ?? "<unknown>"})...`);
182182
log(`JS actions dist path: ${jsActionsPath}`);
183183
log(`JS actions files found: ${jsActions.length}`);
184-
await cloneRepo(moduleInfo.testProjectUrl, tmpFolder);
184+
await cloneRepo(moduleInfo.testProjectUrl, tmpFolder, moduleInfo.testProjectBranchName);
185185

186186
log(`Deleting existing JS Actions from test project: ${tmpFolderActions}`);
187187
await rm(tmpFolderActions, { force: true, recursive: true }); // this is useful to avoid retaining stale dependencies in the test project.

scripts/release/module-automation/commons.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function getFiles(folder: string, extensions?: string[]): Promise<string[
88

99
export function getPackageInfo(folder: string): Promise<any>;
1010

11-
export function cloneRepo(githubUrl: string, localFolder: string): Promise<void>;
11+
export function cloneRepo(githubUrl: string, localFolder: string, branchName?: string): Promise<void>;
1212

1313
export function createMPK(tmpFolder: string, moduleInfo: any, excludeFilesRegExp: RegExp): Promise<string>;
1414

scripts/release/module-automation/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { access, copyFile, rename, rm } from "fs/promises";
22
import { basename, join } from "path";
3-
import { globSync } from "glob";
3+
import { sync } from "glob";
44
import { exec } from "child_process";
55

66
type OssReadMeValidationCriteria = {
@@ -24,7 +24,7 @@ export async function getOssFiles(
2424
}
2525

2626
const readmePattern = "*__*__READMEOSS_*.html";
27-
const readme = globSync(readmePattern, { cwd: folderPath, absolute: true, ignore: "**/.*/**" })[0];
27+
const readme = sync(readmePattern, { cwd: folderPath, absolute: true, ignore: "**/.*/**" })[0];
2828
if (validationCriteria) {
2929
validateOssReadme(readme, validationCriteria);
3030
}

0 commit comments

Comments
 (0)