Skip to content

Commit

Permalink
ci: fix injection in generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
khawarizmus committed Jan 12, 2024
1 parent 177c5eb commit 89b98c7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ if (START_YEAR && END_YEAR)
console.log(kleur.green(`Previously generated data from year ${kleur.yellow('AH ' + `${START_YEAR}`)} to ${kleur.yellow('AH ' + `${END_YEAR}`)} is available.`))

const isGithubCI = ciDetect() === 'github-actions'
console.log('is CI', isGithubCI)

if (isGithubCI)
prompts.inject([false, true, 1440, 1443])
prompts.inject([true, 1440, 1443])

const useExisting = await prompts({
type: (START_YEAR && END_YEAR) ? 'confirm' : null,
Expand All @@ -47,8 +47,6 @@ const doValidate = await prompts({
message: 'Do You want to validate the generated data?',
})

console.log('existing', useExisting.value)
console.log('validate', doValidate.value)
if (!useExisting.value) {
console.log('we will generate new data')
await prompts({
Expand Down Expand Up @@ -76,9 +74,6 @@ if (!useExisting.value) {
})
}

console.log('START_YEAR', await storage.getItem<number>('START_YEAR'))
console.log('END_YEAR', await storage.getItem<number>('END_YEAR'))

export async function dataGenerator() {
if (useExisting.value) {
// return existing data
Expand Down

0 comments on commit 89b98c7

Please sign in to comment.