Skip to content

Commit

Permalink
Troubleshooting broken dist task in CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
bbyars committed Feb 28, 2021
1 parent ce4b879 commit c07e7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tasks/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ async function run (command, args, options) {

options.stdio = 'inherit';

console.log(`${command} ${args.join(' ')} with ${JSON.stringify(options)}`);

return new Promise((resolve, reject) => {
const proc = spawn(command, args, options);

Expand Down
6 changes: 3 additions & 3 deletions tasks/tmp/dist/dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ async function distPackage (source, destination, packageTransformer) {
fs.writeFileSync(`dist/${destination}/package.json`, JSON.stringify(pkg, null, 2));

await run('npm', ['ci'], { cwd: `dist/${destination}` });
await run('npm', ['prune'], { cwd: `dist/${destination}` });
await run('npm', ['dedupe'], { cwd: `dist/${destination}` });
}

async function packageMountebank () {
distPackage('.', 'mountebank', pkg => {
await distPackage('.', 'mountebank', pkg => {
delete pkg.devDependencies;
Object.keys(pkg.scripts).forEach(script => {
// We don't package most tasks and don't want users running them anyhow
Expand All @@ -31,7 +31,7 @@ async function packageMountebank () {
}

async function packageMbTest () {
distPackage('mbTest', 'test', pkg => {
await distPackage('mbTest', 'test', pkg => {
pkg.dependencies.mountebank = 'file:../mountebank';
const lockfile = JSON.parse(fs.readFileSync('dist/test/package-lock.json'));
lockfile.dependencies.mountebank.version = 'file:../mountebank';
Expand Down

0 comments on commit c07e7ef

Please sign in to comment.