chore: use test branch

This commit is contained in:
Cheng Liu 2024-03-13 14:08:00 -07:00
parent 22362507b9
commit 57842c3938
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6

View file

@ -21,16 +21,17 @@ export async function runAsync(runScriptOptions: IRunScriptOptions): Promise<voi
const temporaryDirectory: string = path.resolve(buildFolderPath, 'temp');
const testRepoURL: string = 'https://github.com/tiktok/sparo.git';
const testBranch: string = 'test-artifacts/sparo-real-repo-test';
const repoFolder: string = path.resolve(temporaryDirectory, 'sparo');
await FileSystem.deleteFolderAsync(repoFolder);
const commandDefinitions: ICommandDefinition[] = [
// sparo clone git@github.com:tiktok/sparo.git --branch build-test
// sparo clone git@github.com:tiktok/sparo.git --branch test-artifacts/sparo-real-repo-test
{
kind: 'sparo-command',
name: 'clone',
args: ['clone', testRepoURL, '--branch', 'build-test'],
args: ['clone', testRepoURL, '--branch', testBranch],
currentWorkingDirectory: temporaryDirectory
},
// sparo init-profile --profile my-build-test
@ -105,9 +106,4 @@ export async function runAsync(runScriptOptions: IRunScriptOptions): Promise<voi
logger,
production
});
// Clean up the temporary directory in CI builds, but leave it for local debugging
if (production) {
await FileSystem.deleteFolderAsync(repoFolder);
}
}