File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 7979 },
8080 "scripts" : {
8181 "build" : " run-p build:transpile build:types" ,
82- "build:layer" : " rollup -c rollup.lambda-extension.config.mjs && yarn ts-node scripts/buildLambdaLayer.ts" ,
82+ "build:layer" : " rimraf build/aws && rollup -c rollup.lambda-extension.config.mjs && yarn ts-node scripts/buildLambdaLayer.ts" ,
8383 "build:dev" : " run-p build:transpile build:types" ,
8484 "build:transpile" : " rollup -c rollup.npm.config.mjs && yarn build:layer" ,
8585 "build:types" : " run-s build:types:core build:types:downlevel" ,
Original file line number Diff line number Diff line change @@ -51,9 +51,11 @@ async function buildLambdaLayer(): Promise<void> {
5151 fs . chmodSync ( './build/aws/dist-serverless/sentry-extension/index.mjs' , 0o755 ) ;
5252
5353 const zipFilename = `sentry-node-serverless-${ version } .zip` ;
54+ // Only include these directories in the zip file
55+ const dirsToZip = [ 'nodejs' , 'extensions' , 'sentry-extension' ] ;
5456 console . log ( `Creating final layer zip file ${ zipFilename } .` ) ;
5557 // need to preserve the symlink above with -y
56- run ( `zip -r -y ${ zipFilename } . ` , { cwd : 'build/aws/dist-serverless' } ) ;
58+ run ( `zip -r -y ${ zipFilename } ${ dirsToZip . join ( ' ' ) } ` , { cwd : 'build/aws/dist-serverless' } ) ;
5759}
5860
5961// eslint-disable-next-line @typescript-eslint/no-floating-promises
You can’t perform that action at this time.
0 commit comments