File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,20 @@ async function packageUp() {
5454 fs . mkdirSync ( nodbUtil . RELEASE_DIR , { recursive : true , mode : 0o755 } ) ;
5555 await copyDir ( nodbUtil . STAGING_DIR , nodbUtil . RELEASE_DIR ) ;
5656
57+ // Don't include source code etc. in the npm package. This is
58+ // done dynamically because .npmignore cannot exclude source code
59+ // by default otherwise compiling from a GitHub tag or branch
60+ // won't work.
61+ fs . appendFileSync ( '.npmignore' , '\n/odpi\n/src\nbinding.gyp\n/package/buildbinary.js\n/package/buildpackage.js\n' ) ;
62+
5763 // Build the package
5864 execSync ( 'npm pack' ) ;
65+
5966 } catch ( err ) {
6067 console . error ( err ) ;
6168 } finally {
62- // Undo changes to package.json
63- execSync ( 'git checkout package.json' ) ;
69+ // Undo changes to the repo
70+ execSync ( 'git checkout package.json .npmignore ' ) ;
6471 }
6572}
6673
You can’t perform that action at this time.
0 commit comments