const createTarball = () => { const configPath = fs.existsSync(path.resolve('.fly', '.fly.yml')) ? '.fly/.fly.yml' : '.fly.yml'; const entries = [ configPath, ...glob.sync('.fly/*/**.{js,json}', { cwd: process.cwd() }), ...yaml .safeLoad(fs.readFileSync(path.join(process.cwd(), '.fly.yml'))) .files.reduce( (files, file) => files.push(...glob.sync(file)) && files, [] ), ].filter(file => fs.existsSync(path.resolve(process.cwd(), file))); return tar.create( { portable: true, follow: true, file: '.fly/bundle.tar' }, entries ); }
return tar.create({