Skip to content

Commit

Permalink
chore(): rename delay
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Nov 24, 2023
1 parent 257c9d9 commit c1e0c0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env node

const delay = parseInt(process.env.CI_DELAY || 1_000, 10);
const de_layyy = parseInt(process.env.CI_DELAY || 1_000, 10);
const shouldFail = Boolean(process.env.CI_FAIL || '');

console.log('config', {delay, shouldFail, raw: { delay: process.env.CI_DELAY, shouldFail: process.env.CI_FAIL}});
console.log('config', {delay: de_layyy, shouldFail, raw: { delay: process.env.CI_DELAY, shouldFail: process.env.CI_FAIL}});

await new Promise((resolve, reject) => {
console.log(`Running build... for ${delay / 1000} seconds`);
console.log(`Running build... for ${de_layyy / 1000} seconds`);
setTimeout(() => {
if (shouldFail) {
return reject('failing.... booo');
}
resolve(true);
}, delay);
}, de_layyy);
});

console.log("Built!");

0 comments on commit c1e0c0d

Please sign in to comment.