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 79
79
},
80
80
"scripts" : {
81
81
"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" ,
83
83
"build:dev" : " run-p build:transpile build:types" ,
84
84
"build:transpile" : " rollup -c rollup.npm.config.mjs && yarn build:layer" ,
85
85
"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> {
51
51
fs . chmodSync ( './build/aws/dist-serverless/sentry-extension/index.mjs' , 0o755 ) ;
52
52
53
53
const zipFilename = `sentry-node-serverless-${ version } .zip` ;
54
+ // Only include these directories in the zip file
55
+ const dirsToZip = [ 'nodejs' , 'extensions' , 'sentry-extension' ] ;
54
56
console . log ( `Creating final layer zip file ${ zipFilename } .` ) ;
55
57
// 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' } ) ;
57
59
}
58
60
59
61
// eslint-disable-next-line @typescript-eslint/no-floating-promises
You can’t perform that action at this time.
0 commit comments