mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 21:07:46 +00:00
[redwood] Fix file permissions and add support for build script (#4999)
Some files require execution privileges, such as Prisma, so we must preserve the file mode. We also want redwood to behave the same as other frameworks and use `yarn build` if available.
This commit is contained in:
@@ -6,7 +6,7 @@ const glob = require('util').promisify(require('glob'));
|
||||
const path = require('path');
|
||||
const { spawn } = require('child_process');
|
||||
const fetch = require('./fetch-retry.js');
|
||||
const { nowDeploy } = require('./now-deploy.js');
|
||||
const { nowDeploy, fileModeSymbol } = require('./now-deploy.js');
|
||||
|
||||
async function packAndDeploy(builderPath) {
|
||||
await spawnAsync('npm', ['--loglevel', 'warn', 'pack'], {
|
||||
@@ -37,6 +37,7 @@ async function testDeployment(
|
||||
const bodies = globResult.reduce((b, f) => {
|
||||
const r = path.relative(fixturePath, f);
|
||||
b[r] = fs.readFileSync(f);
|
||||
b[r][fileModeSymbol] = fs.statSync(f).mode;
|
||||
return b;
|
||||
}, {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user