1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

fix(cli): add --base option to run test command

This commit is contained in:
Divlo
2021-06-30 15:23:58 +02:00
parent ede3e7526b
commit 996dcd89c3
3 changed files with 25 additions and 8 deletions

View File

@ -39,12 +39,17 @@ export class RunTestCommand extends Command {
description: 'Run the tests for the Continuous Integration (CI).'
})
public base = Option.String('--base', {
description: 'Base of the current branch (usually master)'
})
async execute (): Promise<number> {
console.log()
try {
if (this.affected) {
const gitAffected = new GitAffected({
isContinuousIntegration: this.isContinuousIntegration
isContinuousIntegration: this.isContinuousIntegration,
base: this.base
})
const solutions = await gitAffected.getAffectedSolutions()
for (const solution of solutions) {